emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: w32-pass-lwindow-to-system does not work as expected


From: Lennart Borgman
Subject: Re: w32-pass-lwindow-to-system does not work as expected
Date: Tue, 05 Jul 2005 22:54:22 +0200
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Eli Zaretskii wrote:

Date: Tue, 05 Jul 2005 21:14:34 +0200
From: Lennart Borgman <address@hidden>

To overcome this a low level keyboard hook must be used. A good starting point summary is found at http://www.codeproject.com/win32/AntonioWinLock.asp. Look under subtitle "Hooks".

Watch out for the caveats of using low-level keyboard interfaces: what
the hook gets is the scan code of the key and various bit masks for
the modifier keys.  That means that the application (us) will have to
take care of the key translation machinery, such as mapping the same
keys to different characters depending on the language, translation of
AltGr + KEY combinations to produce special non-ASCII characters, etc.
Eventually, it is quite possible that we will have to introduce
translation code and tables into Emacs for each supported keyboard
input language.  See msdos.c for an example of where this could lead;
that way lies madness.  (The MSDOS port had no good alternative, since
too many useful key combinations would be unavailable for Emacs if it
were to use only the standard keyboard interface.  But I wouldn't
recommend going that way just to fix some obscure misfeature which
most users won't even notice unless explicitly told about.)
I would not suggest using it if I believed that. I have seen what trouble it could be handling keyboard keys. The nice thing here is however that not much might be required. Look at the example here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/html/xpvisualstyles.asp

Would it not be possible to detect for example <lwindow> here and send an Emacs specific message to the Emacs thread that recieves the keyboard input?

BTW that page says that is has to be systemwide, but the page I sent before shows how to avoid that.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]