stop some x: keys simulating shift
This commit is contained in:
parent
c828f2d8ed
commit
04227e1d0e
2 changed files with 10 additions and 28 deletions
18
keys.go
18
keys.go
|
@ -408,7 +408,6 @@ var xKeysNormal = map[string]int{
|
||||||
"kp_insert": uinput.KeyKp0,
|
"kp_insert": uinput.KeyKp0,
|
||||||
"kp_delete": uinput.KeyKpdot,
|
"kp_delete": uinput.KeyKpdot,
|
||||||
"iso_level3_shift": uinput.KeyZenkakuhankaku,
|
"iso_level3_shift": uinput.KeyZenkakuhankaku,
|
||||||
"less": uinput.Key102Nd,
|
|
||||||
"f11": uinput.KeyF11,
|
"f11": uinput.KeyF11,
|
||||||
"f12": uinput.KeyF12,
|
"f12": uinput.KeyF12,
|
||||||
"katakana": uinput.KeyKatakana,
|
"katakana": uinput.KeyKatakana,
|
||||||
|
@ -564,33 +563,16 @@ var xKeysShifted = map[string]int{
|
||||||
"less": uinput.KeyComma,
|
"less": uinput.KeyComma,
|
||||||
"greater": uinput.KeyDot,
|
"greater": uinput.KeyDot,
|
||||||
"question": uinput.KeySlash,
|
"question": uinput.KeySlash,
|
||||||
"kp_multiply": uinput.KeyKpasterisk,
|
|
||||||
"f1": uinput.KeyF1,
|
|
||||||
"f2": uinput.KeyF2,
|
|
||||||
"f3": uinput.KeyF3,
|
|
||||||
"f4": uinput.KeyF4,
|
|
||||||
"f5": uinput.KeyF5,
|
|
||||||
"f6": uinput.KeyF6,
|
|
||||||
"f7": uinput.KeyF7,
|
|
||||||
"f8": uinput.KeyF8,
|
|
||||||
"f9": uinput.KeyF9,
|
|
||||||
"f10": uinput.KeyF10,
|
|
||||||
"kp_7": uinput.KeyKp7,
|
"kp_7": uinput.KeyKp7,
|
||||||
"kp_8": uinput.KeyKp8,
|
"kp_8": uinput.KeyKp8,
|
||||||
"kp_9": uinput.KeyKp9,
|
"kp_9": uinput.KeyKp9,
|
||||||
"kp_subtract": uinput.KeyKpminus,
|
|
||||||
"kp_4": uinput.KeyKp4,
|
"kp_4": uinput.KeyKp4,
|
||||||
"kp_5": uinput.KeyKp5,
|
"kp_5": uinput.KeyKp5,
|
||||||
"kp_6": uinput.KeyKp6,
|
"kp_6": uinput.KeyKp6,
|
||||||
"kp_add": uinput.KeyKpplus,
|
|
||||||
"kp_1": uinput.KeyKp1,
|
"kp_1": uinput.KeyKp1,
|
||||||
"kp_2": uinput.KeyKp2,
|
"kp_2": uinput.KeyKp2,
|
||||||
"kp_3": uinput.KeyKp3,
|
"kp_3": uinput.KeyKp3,
|
||||||
"kp_0": uinput.KeyKp0,
|
"kp_0": uinput.KeyKp0,
|
||||||
"kp_decimal": uinput.KeyKpdot,
|
|
||||||
"f11": uinput.KeyF11,
|
|
||||||
"f12": uinput.KeyF12,
|
|
||||||
"kp_divide": uinput.KeyKpslash,
|
|
||||||
"sys_req": uinput.KeySysrq,
|
"sys_req": uinput.KeySysrq,
|
||||||
"break": uinput.KeyPause,
|
"break": uinput.KeyPause,
|
||||||
"xf86audiopause": uinput.KeyPrevioussong,
|
"xf86audiopause": uinput.KeyPrevioussong,
|
||||||
|
|
20
xkeys.bash
20
xkeys.bash
|
@ -17,26 +17,26 @@ align() {
|
||||||
/\<KeyMicmute\>/ d'
|
/\<KeyMicmute\>/ d'
|
||||||
}
|
}
|
||||||
|
|
||||||
echo 'var xKeysNormal = map[string]int{'
|
normal="$({
|
||||||
{
|
|
||||||
paste -d ' ' <(xmodmap -pke | sed '1 d; s/.*= /"/; /.*=/ d; s/ .*/":/' | sed '/^"XF86Eject"/ { N; s/.*\n// }') \
|
paste -d ' ' <(xmodmap -pke | sed '1 d; s/.*= /"/; /.*=/ d; s/ .*/":/' | sed '/^"XF86Eject"/ { N; s/.*\n// }') \
|
||||||
<(go doc uinput.keyesc | sed '/Key/ !d; s/^\s*/uinput./; s/ .*/,/' | align) |
|
<(go doc uinput.keyesc | sed '/Key/ !d; s/^\s*/uinput./; s/ .*/,/' | align) |
|
||||||
# Skip really non-matching section, we echo some of them below
|
# Skip really non-matching section, we echo some of them below
|
||||||
sed '/^"XF86Tools"/,/^"XF86AudioPreset"/ d' |
|
sed '/^"XF86Tools"/,/^"XF86AudioPreset"/ d' |
|
||||||
# Remove duplicate keys
|
# Remove duplicate keys
|
||||||
sed '/^"XF86Mail":.*Email/ d; /^"Cancel":.*Stop/ d; /^"XF86Send":.*file/ d; /^"Print":.*Sysrq/ d'
|
sed '/^"XF86Mail":.*Email/ d; /^"Cancel":.*Stop/ d; /^"XF86Send":.*file/ d; /^"Print":.*Sysrq/ d; /Key102Nd,$/ d'
|
||||||
|
|
||||||
echo '"XF86WebCam": uinput.KeyCamera,'
|
echo '"XF86WebCam": uinput.KeyCamera,'
|
||||||
echo '"Print": uinput.KeyPrint,'
|
echo '"Print": uinput.KeyPrint,'
|
||||||
} | sed 's/^".*"/\L&/; s/^/\t/'
|
} | sed 's/^".*"/\L&/; s/^/\t/')"
|
||||||
echo '}'
|
|
||||||
|
printf %s\\n "var xKeysNormal = map[string]int{
|
||||||
|
$normal
|
||||||
|
}
|
||||||
|
"
|
||||||
|
|
||||||
echo ''
|
|
||||||
echo 'var xKeysShifted = map[string]int{'
|
echo 'var xKeysShifted = map[string]int{'
|
||||||
{
|
{
|
||||||
paste -d ' ' <(xmodmap -pke | sed '1 d; s/.*= /"/; /.*=/ d; s/\S* /"/; s/ .*/":/' | sed '/^"XF86Eject"/ { N; s/.*\n// }') \
|
paste -d ' ' <(xmodmap -pke | sed '1 d; s/.*= /"/; /.*=/ d; s/\S* /"/; s/ .*/":/' | sed '/^"XF86Eject"/ { N; s/.*\n// }') \
|
||||||
<(go doc uinput.keyesc | sed '/Key/ !d; s/^\s*/uinput./; s/ .*/,/' | align) | sed '/^"NoSymbol"/ d; /^\S*_[LR]"/ d' |
|
<(go doc uinput.keyesc | sed '/Key/ !d; s/^\s*/uinput./; s/ .*/,/' | align) | sed '/^"NoSymbol"/ d; /^\S*_[LR]"/ d; /Key102Nd,$/ d'
|
||||||
# Remove backspace and duplicate keys
|
} | sed 's/^".*"/\L&/; s/^/\t/' | awk 'NR == FNR {if (length($1) > 4) a[$1]; next} !($1 in a)' <(printf %s\\n "$normal") -
|
||||||
sed '/^"BackSpace"/ d; /^"KP_Decimal":.*Kpcomma/ d; /\<Key102Nd\>/ d'
|
|
||||||
} | sed 's/^".*"/\L&/; s/^/\t/'
|
|
||||||
echo '}'
|
echo '}'
|
||||||
|
|
Loading…
Reference in a new issue