<div dir="ltr">On Tue, Aug 18, 2015 at 11:20 PM, Peter Hutterer <span dir="ltr"><<a href="mailto:peter.hutterer@who-t.net" target="_blank">peter.hutterer@who-t.net</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> My difficulties with xkb are in creating a mapping where by the space bar<br>
> acts as both a modifier *and* a space bar.<br>
<br>
</span>right. I don't think xkb will let you do this, at least not as a either/or<br>
case depending on e.g. how long you press. you'll need to designate a<br>
separate key for it.<br></blockquote><div><br></div><div>He does not want "how long you press". What is wanted is that if the key is pressed and then released without any other keys being pressed, it produces the keysym (on the up event). It acts as a modifier in all cases (the client will see the modifier flag turn on/off).<br><br></div><div>This is a very common request, usually for the opposite reason: to make a modifier also produce a keysym. In particular it would allow Ctrl or AltGr to act as a compose prefix, something a lot of plugins for Windows does, while X (which invented the compose key) is forced to dedicate a key. (compose is (I hope) actually done by the input method, which can in fact do this handling of Ctrl, the problem is that it can't use the mapping of the compose key, it has to actually use Ctrl, and thus it has to have a different configuration file to control what key is the compose prefix than the keyboard layout).<br><br></div><div>This can also make Windows style things like Alt moving the focus to the menubar, or the Super key popping up a dialog while still acting like a modifier. I know these work on Linux but they do so because the apps are actually looking at the Alt or Super key to see if they are released. It seems more consistent that these actually produce a "Move to menubar" or "super menu" keysym, thus allowing keyboard layouts to move them around.<br></div><div><br></div><div>And before you say "rollover" I am well aware of that. The toolkits handling the Alt key are already dealing with this, and it is no excuse for completely disabling functionality!. I think xkb could use the event timestamps to detect this. Though it really sounds like that touch handling stuff with all the fiddly timing and dependency on hardware details, so maybe (yeah right) we could again consider moving keysym translation to libinput and out of clients.<br><br></div></div></div></div>