Using CapsLock as a Function key
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I want to do 2 things:
- Disable CapsLock key so that pressing it doesn't toggle CapsLock.
- Be able to set up custom combinations with CapsLock like:
CapsLock + j
to map toDown
keyCapsLock + k
to map toUp
key
I don't want to swap CapsLock with Ctrl or Win or any other modifier key. I want to be able to use CapsLock as an additional modifier key.
I've explored xmodmap, xbindkeys, xte and it has been hit or miss, sometimes it works and sometimes it doesn't. At this point I'm happy to even write my own custom keyboard driver if that will allow me to do this, but I'm just frustrated at the lack of ability to do such a simple thing in Linux.
In Windows, I can do the same simply with Autohotkey and the following lines in a script:
; Turn off caps lock so it doesn't get pressed accidentally.
SetCapsLockState, AlwaysOff
CapsLock & k::Up
CapsLock & j::Down
CapsLock & h::Left
CapsLock & l::Right
linux keyboard-shortcuts xmodmap
|
show 2 more comments
up vote
0
down vote
favorite
I want to do 2 things:
- Disable CapsLock key so that pressing it doesn't toggle CapsLock.
- Be able to set up custom combinations with CapsLock like:
CapsLock + j
to map toDown
keyCapsLock + k
to map toUp
key
I don't want to swap CapsLock with Ctrl or Win or any other modifier key. I want to be able to use CapsLock as an additional modifier key.
I've explored xmodmap, xbindkeys, xte and it has been hit or miss, sometimes it works and sometimes it doesn't. At this point I'm happy to even write my own custom keyboard driver if that will allow me to do this, but I'm just frustrated at the lack of ability to do such a simple thing in Linux.
In Windows, I can do the same simply with Autohotkey and the following lines in a script:
; Turn off caps lock so it doesn't get pressed accidentally.
SetCapsLockState, AlwaysOff
CapsLock & k::Up
CapsLock & j::Down
CapsLock & h::Left
CapsLock & l::Right
linux keyboard-shortcuts xmodmap
2
Possible duplicate of How to prevent the caps-lock toggle effect, without remapping or disabling it?
– Ipor Sircer
Dec 4 at 3:36
1
Thanks for the link. But it seems to answer only the first part of disabling capslock, doesn't explain how to set up custom keyboard combos with capslock.
– Plasty Grove
Dec 4 at 3:44
You've already know it: xbindkeys.
– Ipor Sircer
Dec 4 at 4:03
@IporSircer if it's that easy why don't you just give a simple working example? If I'm not mistaken,xbindkeys
works by grabbing keys, which are causing spurious FocusOut/FocusIn+NotifyGrab events which are confusing the hell out of many apps.
– mosvy
Dec 4 at 4:18
Because he used windows-related code on a unix-only site.
– Ipor Sircer
Dec 4 at 4:21
|
show 2 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I want to do 2 things:
- Disable CapsLock key so that pressing it doesn't toggle CapsLock.
- Be able to set up custom combinations with CapsLock like:
CapsLock + j
to map toDown
keyCapsLock + k
to map toUp
key
I don't want to swap CapsLock with Ctrl or Win or any other modifier key. I want to be able to use CapsLock as an additional modifier key.
I've explored xmodmap, xbindkeys, xte and it has been hit or miss, sometimes it works and sometimes it doesn't. At this point I'm happy to even write my own custom keyboard driver if that will allow me to do this, but I'm just frustrated at the lack of ability to do such a simple thing in Linux.
In Windows, I can do the same simply with Autohotkey and the following lines in a script:
; Turn off caps lock so it doesn't get pressed accidentally.
SetCapsLockState, AlwaysOff
CapsLock & k::Up
CapsLock & j::Down
CapsLock & h::Left
CapsLock & l::Right
linux keyboard-shortcuts xmodmap
I want to do 2 things:
- Disable CapsLock key so that pressing it doesn't toggle CapsLock.
- Be able to set up custom combinations with CapsLock like:
CapsLock + j
to map toDown
keyCapsLock + k
to map toUp
key
I don't want to swap CapsLock with Ctrl or Win or any other modifier key. I want to be able to use CapsLock as an additional modifier key.
I've explored xmodmap, xbindkeys, xte and it has been hit or miss, sometimes it works and sometimes it doesn't. At this point I'm happy to even write my own custom keyboard driver if that will allow me to do this, but I'm just frustrated at the lack of ability to do such a simple thing in Linux.
In Windows, I can do the same simply with Autohotkey and the following lines in a script:
; Turn off caps lock so it doesn't get pressed accidentally.
SetCapsLockState, AlwaysOff
CapsLock & k::Up
CapsLock & j::Down
CapsLock & h::Left
CapsLock & l::Right
linux keyboard-shortcuts xmodmap
linux keyboard-shortcuts xmodmap
edited Dec 4 at 6:38
Rui F Ribeiro
38.5k1479128
38.5k1479128
asked Dec 4 at 3:31
Plasty Grove
1041
1041
2
Possible duplicate of How to prevent the caps-lock toggle effect, without remapping or disabling it?
– Ipor Sircer
Dec 4 at 3:36
1
Thanks for the link. But it seems to answer only the first part of disabling capslock, doesn't explain how to set up custom keyboard combos with capslock.
– Plasty Grove
Dec 4 at 3:44
You've already know it: xbindkeys.
– Ipor Sircer
Dec 4 at 4:03
@IporSircer if it's that easy why don't you just give a simple working example? If I'm not mistaken,xbindkeys
works by grabbing keys, which are causing spurious FocusOut/FocusIn+NotifyGrab events which are confusing the hell out of many apps.
– mosvy
Dec 4 at 4:18
Because he used windows-related code on a unix-only site.
– Ipor Sircer
Dec 4 at 4:21
|
show 2 more comments
2
Possible duplicate of How to prevent the caps-lock toggle effect, without remapping or disabling it?
– Ipor Sircer
Dec 4 at 3:36
1
Thanks for the link. But it seems to answer only the first part of disabling capslock, doesn't explain how to set up custom keyboard combos with capslock.
– Plasty Grove
Dec 4 at 3:44
You've already know it: xbindkeys.
– Ipor Sircer
Dec 4 at 4:03
@IporSircer if it's that easy why don't you just give a simple working example? If I'm not mistaken,xbindkeys
works by grabbing keys, which are causing spurious FocusOut/FocusIn+NotifyGrab events which are confusing the hell out of many apps.
– mosvy
Dec 4 at 4:18
Because he used windows-related code on a unix-only site.
– Ipor Sircer
Dec 4 at 4:21
2
2
Possible duplicate of How to prevent the caps-lock toggle effect, without remapping or disabling it?
– Ipor Sircer
Dec 4 at 3:36
Possible duplicate of How to prevent the caps-lock toggle effect, without remapping or disabling it?
– Ipor Sircer
Dec 4 at 3:36
1
1
Thanks for the link. But it seems to answer only the first part of disabling capslock, doesn't explain how to set up custom keyboard combos with capslock.
– Plasty Grove
Dec 4 at 3:44
Thanks for the link. But it seems to answer only the first part of disabling capslock, doesn't explain how to set up custom keyboard combos with capslock.
– Plasty Grove
Dec 4 at 3:44
You've already know it: xbindkeys.
– Ipor Sircer
Dec 4 at 4:03
You've already know it: xbindkeys.
– Ipor Sircer
Dec 4 at 4:03
@IporSircer if it's that easy why don't you just give a simple working example? If I'm not mistaken,
xbindkeys
works by grabbing keys, which are causing spurious FocusOut/FocusIn+NotifyGrab events which are confusing the hell out of many apps.– mosvy
Dec 4 at 4:18
@IporSircer if it's that easy why don't you just give a simple working example? If I'm not mistaken,
xbindkeys
works by grabbing keys, which are causing spurious FocusOut/FocusIn+NotifyGrab events which are confusing the hell out of many apps.– mosvy
Dec 4 at 4:18
Because he used windows-related code on a unix-only site.
– Ipor Sircer
Dec 4 at 4:21
Because he used windows-related code on a unix-only site.
– Ipor Sircer
Dec 4 at 4:21
|
show 2 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f485814%2fusing-capslock-as-a-function-key%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
Possible duplicate of How to prevent the caps-lock toggle effect, without remapping or disabling it?
– Ipor Sircer
Dec 4 at 3:36
1
Thanks for the link. But it seems to answer only the first part of disabling capslock, doesn't explain how to set up custom keyboard combos with capslock.
– Plasty Grove
Dec 4 at 3:44
You've already know it: xbindkeys.
– Ipor Sircer
Dec 4 at 4:03
@IporSircer if it's that easy why don't you just give a simple working example? If I'm not mistaken,
xbindkeys
works by grabbing keys, which are causing spurious FocusOut/FocusIn+NotifyGrab events which are confusing the hell out of many apps.– mosvy
Dec 4 at 4:18
Because he used windows-related code on a unix-only site.
– Ipor Sircer
Dec 4 at 4:21