Re: Emulation of Alt+Numpad+Digits behavior
Paulo César Pereira de Andrade <[email protected]>
| Newsgroups | gmane.comp.xfree86.devel,gmane.comp.xfree86.internationalization |
|---|---|
| Message-ID | <[email protected]> |
Alan Coopersmith wrote: Hi, I am not sure either what would be the correct place for this code. One possible place is keep some state code in xc/programs/Xserver/hw/xfree86/common/xf86Events.c:xf86PostKbdEvent(), maybe handle it in xkb code or as Alan said, a new input method. > I'm not familiar with all the details, but it sounds like this may be > easiest done by adding a new input method on the client side - I've > cc'ed the i18n list in the hopes someone there can confirm or deny my > suspicion. > > -Alan Coopersmith- [email protected] > Sun Microsystems, Inc. - X Window System Engineering > > Jörg Henne wrote: > >> Hi, >> >> well, even after digging through lots of source code and >> documentation, I could really use some help. What I am trying to do is >> to emulate the MS-Windows behaviour which lets one enter arbitrary >> characters by using the Alt-Key while entering the character code on >> the numerical keypad. >> >> What would have to happen in order to emulate this feature is pretty >> simple: after releasing the Alt-Key, two (down/up) extra events would >> have to be sent which carry the keysym for the character which has >> been entered. However, this is not possible because the events carry >> just the keycodes and not keysyms. >> >> I currently see two solutions: >> - To add some code to the keyboard driver which synthesizes the events >> using a keysym-to-keycode lookup. This poses some problems: what >> happens if no corresponding keycode exists for thei given keysym? And >> how does this go together with xkb processing? >> >> - To extend Xlib so that the emulation happens on the client side. Of >> course this brings up even bigger problems: is there a central and >> reliable place to do this? XLookupKeysym and friends would have to >> keep some state and work together with some event dispatching magic. >> That doesn't really sound healthy. >> >> Well, that's it for now. Any help would be very greatly appreciated. >> Joerg Henne Paulo