emacs-devel
[Top][All Lists]
Advanced

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

Re: Key bindings proposal


From: Lennart Borgman
Subject: Re: Key bindings proposal
Date: Fri, 6 Aug 2010 04:34:46 +0200

On Fri, Aug 6, 2010 at 3:58 AM, Lennart Borgman
<address@hidden> wrote:
> On Fri, Aug 6, 2010 at 3:41 AM, Lennart Borgman
> <address@hidden> wrote:
>> On Fri, Aug 6, 2010 at 3:35 AM, Jason Rumney <address@hidden> wrote:
>
>>> http://stackoverflow.com/questions/2490577/suppress-task-switch-keys-winkey-alt-tab-alt-esc-ctrl-esc-using-low-level-ke
>>
>>
>> Thanks. I will test the last one and see. That is a recent article.
>
> This article code uses HasAltModifier to test for Alt in the low level
> keyboard hook. It seems to be some c++ variant. What can I do instead
> in Emacs?

I tested with code similar to this:

            case VK_TAB:
              /*
                Tip from Jason 2010-08-05 regarding suppressing
Alt-TAB in the hook:

http://stackoverflow.com/questions/2490577/suppress-task-switch-keys-winkey-alt-tab-alt-esc-ctrl-esc-using-low-level-ke

                For the computer user instead, using registry setting of
                [HKEY_CURRENT_USER\Control Panel\Desktop]
                "CoolSwitch"="0"

http://stackoverflow.com/questions/2970683/disable-windows-and-alt-tab-key-combos
              */

              {
                //if (HasAltModifier(pkbdllhook->flags))
                if ((pkbdllhook->flags & LLKHF_ALTDOWN) != 0)
                  {
                    // return new IntPtr(1);
                    return TRUE;
                  }
              }

It surprised me in several ways:

- It actually suppressed Alt-TAB, but for ALL RUNNING PROGRAMS! (That
make me think of that Eli once said that the low level keyboard hook
would affect all programs. It normally does not so there is something
strange here.)

So the code above can not be used in Emacs. Does someone has any idea
of what is wrong here?



reply via email to

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