From: malc Date: Sat, 15 Dec 2012 17:19:39 +0000 (+0400) Subject: Process keyboard state differently X-Git-Tag: v14~83 X-Git-Url: https://repo.or.cz/w/llpp.git/commitdiff_plain/138d8c54265020e651b4d6c7e796473ef4d6cb1c Process keyboard state differently Would be nice to find where all of this is properly documented. --- diff --git a/wsi.ml b/wsi.ml index 32f4c34..c224c0b 100644 --- a/wsi.ml +++ b/wsi.ml @@ -378,8 +378,13 @@ let getmodifiermappingreq () = ;; let getkeysym code mask = - let index = (mask land 1) lxor ((mask land state.capslmask) lsr 1) in - let index = index lor ((mask land 0x80) lsr 5) in + let shinc = (mask land 1) lxor ((mask land state.capslmask) lsr 1) in + let msh = ((mask land 0x10) lsr 4) + + ((mask land 0x20) lsr 5) + + ((mask land 0x40) lsr 6) + + ((mask land 0x80) lsr 7) + in + let index = (1 lsl msh) + shinc in let keysym = state.keymap.(code-state.mink).(index) in if index = 1 && keysym = 0 then state.keymap.(code-state.mink).(0)