public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* cygwin and xwin and super and hyper
@ 2013-06-19 21:27 J. David Boyd
2013-06-20 10:55 ` Jon TURNEY
0 siblings, 1 reply; 5+ messages in thread
From: J. David Boyd @ 2013-06-19 21:27 UTC (permalink / raw)
To: cygwin-xfree
I can get my capslock key to be super with the command line 'setxkbmap -option
caps:super', but I can't get 'setxkbmap -option altwin:hyper_win' to do
anything.
Running 'setxkbmap -print' shows both options as being set, but the win keys
still act as the win key.
Is there something else I need to do so windows lets go of these keys?
Dave
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cygwin and xwin and super and hyper
2013-06-19 21:27 cygwin and xwin and super and hyper J. David Boyd
@ 2013-06-20 10:55 ` Jon TURNEY
2013-06-21 15:56 ` J. David Boyd
0 siblings, 1 reply; 5+ messages in thread
From: Jon TURNEY @ 2013-06-20 10:55 UTC (permalink / raw)
To: cygwin-xfree; +Cc: david
On 19/06/2013 22:27, J. David Boyd wrote:
> I can get my capslock key to be super with the command line 'setxkbmap -option
> caps:super', but I can't get 'setxkbmap -option altwin:hyper_win' to do
> anything.
>
> Running 'setxkbmap -print' shows both options as being set, but the win keys
> still act as the win key.
>
> Is there something else I need to do so windows lets go of these keys?
Yes.
Again, let me refer you to [1]. The operative sentence is:
> (Note that mapping the Windows keys to hyper also requires the -keyhook
> option, so that the X server sees those keys before the Windows shell)
One thing I failed to mention there is that without any keymap options the
keymap should give you super on the windows keys, but you will still need
-keyhook X server option to enable the X server to see the key.
[1] http://cygwin.com/ml/cygwin/2012-03/msg00427.html
--
Jon TURNEY
Volunteer Cygwin/X X Server maintainer
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cygwin and xwin and super and hyper
2013-06-20 10:55 ` Jon TURNEY
@ 2013-06-21 15:56 ` J. David Boyd
2013-06-24 14:05 ` Jon TURNEY
0 siblings, 1 reply; 5+ messages in thread
From: J. David Boyd @ 2013-06-21 15:56 UTC (permalink / raw)
To: cygwin-xfree
Jon TURNEY <jon.turney@dronecode.org.uk> writes:
> On 19/06/2013 22:27, J. David Boyd wrote:
>> I can get my capslock key to be super with the command line 'setxkbmap -option
>> caps:super', but I can't get 'setxkbmap -option altwin:hyper_win' to do
>> anything.
>>
>> Running 'setxkbmap -print' shows both options as being set, but the win keys
>> still act as the win key.
>>
>> Is there something else I need to do so windows lets go of these keys?
>
> Yes.
>
> Again, let me refer you to [1]. The operative sentence is:
>
>> (Note that mapping the Windows keys to hyper also requires the -keyhook
>> option, so that the X server sees those keys before the Windows shell)
>
> One thing I failed to mention there is that without any keymap options the
> keymap should give you super on the windows keys, but you will still need
> -keyhook X server option to enable the X server to see the key.
>
> [1] http://cygwin.com/ml/cygwin/2012-03/msg00427.html
I can get everything working up to the point I start emacs.
The output from 'setxkbmap -print' is:
xkb_keymap {
xkb_keycodes { include "xfree86+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+inet(pc105)+altwin(alt_super_win)+capslock(hyper)" };
xkb_geometry { include "pc(pc105)" };
};
and if I run XEV, and press capslock I get:
KeyPress event, serial 32, synthetic NO, window 0xc00001,
root 0x131, subw 0x0, time 8145997, (504,324), root:(2162,400),
state 0x0, keycode 66 (keysym 0xffed, Hyper_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 32, synthetic NO, window 0xc00001,
root 0x131, subw 0x0, time 8146122, (504,324), root:(2162,400),
state 0x40, keycode 66 (keysym 0xffed, Hyper_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
and if I press Left Windows key I get:
KeyPress event, serial 32, synthetic NO, window 0xc00001,
root 0x131, subw 0x0, time 8148993, (504,324), root:(2162,400),
state 0x0, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 32, synthetic NO, window 0xc00001,
root 0x131, subw 0x0, time 8149102, (504,324), root:(2162,400),
state 0x40, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
All perfect so far.
So, when I start up emacs, and press C-h k, then, for example, Capslock-d,
(hyper-d) I get 'H-d is undefined'. Yeah.
Then I press C-h k, then Left-Win-d, (super-d), I get 'H-d is undefined', and
not 's-d is undefined', which is what I expected to see.
Any ideas how I might resolve this?
Dave
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cygwin and xwin and super and hyper
2013-06-21 15:56 ` J. David Boyd
@ 2013-06-24 14:05 ` Jon TURNEY
2013-06-24 18:08 ` J. David Boyd
0 siblings, 1 reply; 5+ messages in thread
From: Jon TURNEY @ 2013-06-24 14:05 UTC (permalink / raw)
To: cygwin-xfree; +Cc: david
On 21/06/2013 16:56, J. David Boyd wrote:
> Jon TURNEY writes:
>> On 19/06/2013 22:27, J. David Boyd wrote:
>>> I can get my capslock key to be super with the command line 'setxkbmap -option
>>> caps:super', but I can't get 'setxkbmap -option altwin:hyper_win' to do
>>> anything.
>>>
>>> Running 'setxkbmap -print' shows both options as being set, but the win keys
>>> still act as the win key.
>>>
>>> Is there something else I need to do so windows lets go of these keys?
>>
>> Yes.
>>
>> Again, let me refer you to [1]. The operative sentence is:
>>
>>> (Note that mapping the Windows keys to hyper also requires the -keyhook
>>> option, so that the X server sees those keys before the Windows shell)
>>
>> One thing I failed to mention there is that without any keymap options the
>> keymap should give you super on the windows keys, but you will still need
>> -keyhook X server option to enable the X server to see the key.
>>
>> [1] http://cygwin.com/ml/cygwin/2012-03/msg00427.html
>
>
> I can get everything working up to the point I start emacs.
>
> The output from 'setxkbmap -print' is:
>
> xkb_keymap {
> xkb_keycodes { include "xfree86+aliases(qwerty)" };
> xkb_types { include "complete" };
> xkb_compat { include "complete" };
> xkb_symbols { include "pc+us+inet(pc105)+altwin(alt_super_win)+capslock(hyper)" };
> xkb_geometry { include "pc(pc105)" };
> };
>
> and if I run XEV, and press capslock I get:
>
> KeyPress event, serial 32, synthetic NO, window 0xc00001,
> root 0x131, subw 0x0, time 8145997, (504,324), root:(2162,400),
> state 0x0, keycode 66 (keysym 0xffed, Hyper_L), same_screen YES,
> XLookupString gives 0 bytes:
> XmbLookupString gives 0 bytes:
> XFilterEvent returns: False
>
> KeyRelease event, serial 32, synthetic NO, window 0xc00001,
> root 0x131, subw 0x0, time 8146122, (504,324), root:(2162,400),
> state 0x40, keycode 66 (keysym 0xffed, Hyper_L), same_screen YES,
> XLookupString gives 0 bytes:
> XFilterEvent returns: False
>
>
> and if I press Left Windows key I get:
>
> KeyPress event, serial 32, synthetic NO, window 0xc00001,
> root 0x131, subw 0x0, time 8148993, (504,324), root:(2162,400),
> state 0x0, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
> XLookupString gives 0 bytes:
> XmbLookupString gives 0 bytes:
> XFilterEvent returns: False
>
> KeyRelease event, serial 32, synthetic NO, window 0xc00001,
> root 0x131, subw 0x0, time 8149102, (504,324), root:(2162,400),
> state 0x40, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
> XLookupString gives 0 bytes:
> XFilterEvent returns: False
>
>
>
> All perfect so far.
>
> So, when I start up emacs, and press C-h k, then, for example, Capslock-d,
> (hyper-d) I get 'H-d is undefined'. Yeah.
>
> Then I press C-h k, then Left-Win-d, (super-d), I get 'H-d is undefined', and
> not 's-d is undefined', which is what I expected to see.
>
> Any ideas how I might resolve this?
Looking at the xev output for Hyper-d and Super-d, it seems they have the same
state (modifier) value.
This is because xkeyboard-config seems to place super and hyper on the same
modifier, mod4, as can be seen looking at the output of 'xmodmap -pm'
> $ xmodmap -pm
> xmodmap: up to 5 keys per modifier, (keycodes in parentheses):
>
> shift Shift_L (0x32), Shift_R (0x3e)
> lock
> control Control_L (0x25), Control_R (0x6d)
> mod1 Alt_L (0x40), Alt_R (0x74), Meta_L (0x9c)
> mod2 Num_Lock (0x4d)
> mod3
> mod4 Hyper_L (0x42), Super_L (0x73), Super_R (0x75), Super_L (0x7f), Hyper_L (0x80)
> mod5 Mode_switch (0x8), ISO_Level3_Shift (0x7c)
And it seems that emacs only looks at the modifier state, not the actual
proceeding keypress.
A workaround for this is to move Hyper_L to the unused mod3 modifier.
> $ xmodmap -e "remove mod4 = Hyper_L"
>
> $ xmodmap -e "add mod3 = Hyper_L"
>
> $ xmodmap -pm
> xmodmap: up to 3 keys per modifier, (keycodes in parentheses):
>
> shift Shift_L (0x32), Shift_R (0x3e)
> lock
> control Control_L (0x25), Control_R (0x6d)
> mod1 Alt_L (0x40), Alt_R (0x74), Meta_L (0x9c)
> mod2 Num_Lock (0x4d)
> mod3 Hyper_L (0x42), Hyper_L (0x80)
> mod4 Super_L (0x73), Super_R (0x75), Super_L (0x7f)
> mod5 Mode_switch (0x8), ISO_Level3_Shift (0x7c)
It's probably a bug that this doesn't work as expected, but I'm not sure in what.
--
Jon TURNEY
Volunteer Cygwin/X X Server maintainer
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cygwin and xwin and super and hyper
2013-06-24 14:05 ` Jon TURNEY
@ 2013-06-24 18:08 ` J. David Boyd
0 siblings, 0 replies; 5+ messages in thread
From: J. David Boyd @ 2013-06-24 18:08 UTC (permalink / raw)
To: cygwin-xfree
Jon TURNEY <jon.turney@dronecode.org.uk> writes:
> On 21/06/2013 16:56, J. David Boyd wrote:
>> Jon TURNEY writes:
>>> On 19/06/2013 22:27, J. David Boyd wrote:
>>
>> All perfect so far.
>>
>> So, when I start up emacs, and press C-h k, then, for example, Capslock-d,
>> (hyper-d) I get 'H-d is undefined'. Yeah.
>>
>> Then I press C-h k, then Left-Win-d, (super-d), I get 'H-d is undefined', and
>> not 's-d is undefined', which is what I expected to see.
>>
>> Any ideas how I might resolve this?
>
> Looking at the xev output for Hyper-d and Super-d, it seems they have the same
> state (modifier) value.
>
> This is because xkeyboard-config seems to place super and hyper on the same
> modifier, mod4, as can be seen looking at the output of 'xmodmap -pm'
>
>> $ xmodmap -pm
>> xmodmap: up to 5 keys per modifier, (keycodes in parentheses):
>>
>> shift Shift_L (0x32), Shift_R (0x3e)
>> lock
>> control Control_L (0x25), Control_R (0x6d)
>> mod1 Alt_L (0x40), Alt_R (0x74), Meta_L (0x9c)
>> mod2 Num_Lock (0x4d)
>> mod3
>> mod4 Hyper_L (0x42), Super_L (0x73), Super_R (0x75), Super_L (0x7f), Hyper_L (0x80)
>> mod5 Mode_switch (0x8), ISO_Level3_Shift (0x7c)
>
> And it seems that emacs only looks at the modifier state, not the actual
> proceeding keypress.
>
> A workaround for this is to move Hyper_L to the unused mod3 modifier.
>
>> $ xmodmap -e "remove mod4 = Hyper_L"
>>
>> $ xmodmap -e "add mod3 = Hyper_L"
>>
>> $ xmodmap -pm
>> xmodmap: up to 3 keys per modifier, (keycodes in parentheses):
>>
>> shift Shift_L (0x32), Shift_R (0x3e)
>> lock
>> control Control_L (0x25), Control_R (0x6d)
>> mod1 Alt_L (0x40), Alt_R (0x74), Meta_L (0x9c)
>> mod2 Num_Lock (0x4d)
>> mod3 Hyper_L (0x42), Hyper_L (0x80)
>> mod4 Super_L (0x73), Super_R (0x75), Super_L (0x7f)
>> mod5 Mode_switch (0x8), ISO_Level3_Shift (0x7c)
>
> It's probably a bug that this doesn't work as expected, but I'm not sure in what.
Thanks, that just what I did, and now it works fine.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-06-24 18:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-19 21:27 cygwin and xwin and super and hyper J. David Boyd
2013-06-20 10:55 ` Jon TURNEY
2013-06-21 15:56 ` J. David Boyd
2013-06-24 14:05 ` Jon TURNEY
2013-06-24 18:08 ` J. David Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).