Add timeout for mapping control to escape
After holding capslock for 500ms, it will not generate an escape press to avoid some unintentional presses of escape.
This commit is contained in:
parent
131e8e212a
commit
6b7e5d119f
1 changed files with 2 additions and 1 deletions
3
.xinitrc
3
.xinitrc
|
@ -49,7 +49,8 @@ setxkbmap -option grp:alt_shift_toggle
|
|||
# this only works when we already substitute a ctrl for caps with the lines above,
|
||||
# otherwise control itself will act as escape.
|
||||
# Needs xcape package installed. https://github.com/alols/xcape
|
||||
type xcape >/dev/null 2>&1 && xcape -e 'Control_L=Escape'
|
||||
# set a timeout of 500ms, if pressed longer it will ignore esc
|
||||
type xcape >/dev/null 2>&1 && xcape -e 'Control_L=Escape' -t 500
|
||||
|
||||
# if unclutter exists start it
|
||||
type unclutter >/dev/null 2>&1 && unclutter &
|
||||
|
|
Loading…
Reference in a new issue