There was a patch I stumbled onto within the Chromium OS repository that might help with this; it seems to have been removed after they actually patched it into Chrome itself. Not sure what happened with the QA for the patch or if it was sent upstream or not.
links here: X: Map Alt-Up and Alt-Down to Page Up and Page Down
The patch is as follows:
This is a probably-wrong fix for an issue where autorepeat
is disabled for keys assigned by XKB. As far as I can tell,
XKB has the correct autorepeat settings for the keys before
a completely-empty autorepeat array from X is copied over
it; then the XKB array is copied back to X. This makes us
skip the first copy.
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 75e243c..bceb55c 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -342,9 +342,6 @@ CARD8 * repeat;
xkb= xkbi->desc;
repeat= xkb->ctrls->per_key_repeat;
- if (pXDev->kbdfeed)
- memcpy(repeat,pXDev->kbdfeed->ctrl.autoRepeats,32);
-
XkbUpdateDescActions(xkb,first,num,changes);
if ((pXDev->kbdfeed)&&
I've yet to try it myself, but will probably take a shot at it in a bit.
Still having some (I think unrelated) issues with XKB myself, but I do have a Hyper modifier mapped, and I believe the relevant settings are these:
compat:
virtual_modifiers Shift,Control,Meta,Super,Hyper,AltGr;
interpret Hyper_R { action = SetMods(modifiers=Mod4); };
symbols:
modifier_map Mod4 { <DELE> }; // Hyper
key <DELE> { type="UNMODIFIED", [ Hyper_R ], repeat=no };
then something like
key <K_36> { type = "SHIFT+HYPER", [ b, B,
XF86AudioRaiseVolume, XF86AudioRaiseVolume ] };
types
virtual_modifiers Meta,AltGr,Super,Hyper,Mod5;
don't need the Mod5 there unless you're using it also; but likewise, omit Shift & Control here…
type "SHIFT+HYPER" {
modifiers= Shift+Hyper;
map[Shift]= Level2;
map[Hyper]= Level3;
map[Shift+Hyper]= Level4;
};
For what it's worth, I had far, far worse hassles trying to redefing the geometry and key codes than it was worth, and ended up reverting to the pc105
key symbols in <AE01>
form, even though many of them are ludicrously mis-named. (e.g. <DELE>
for my Hyper key)
PS. For a working example, see https://github.com/brpocock/spacey-cadet-keyboard …
Best Answer
With
Hyper_R
in place ofHyper_L
, it goes like this:contents of
~/.config/xkb/keycodes/my-keycodes
:Note:
207
is the default keycode for (virtual)Hyper_R
key in the keycode table loaded on my machine.contents of
~/.config/xkb/symbols/my-symbols
:excerpt from
~/.xinitrc
:This is not the only way to configure
xkb
. Configuration could probably be loaded from a single file with a singlexkbcomp
call. Subdirs of~/.config/xkb/
merely follow the structure of/usr/share/X11/xkb/
. The... -print | xkbcomp ...
part is somewhat convoluted but flexible. At the moment I'm unable to try a simpler setup.