How remap my CapsLock key to work as if it was a Return key using setxkbmap?
up vote
4
down vote
favorite
I tried several things:
setxkbmap -option caps: return
setxkbmap -option caps: enter
I also tried to modify the file /usr/share/X11/xkb/symbols/pc
by:
"Key <CAPS> {[Enter]};"
But nothing worked.
x11 keyboard-shortcuts keyboard-layout xkb
add a comment |
up vote
4
down vote
favorite
I tried several things:
setxkbmap -option caps: return
setxkbmap -option caps: enter
I also tried to modify the file /usr/share/X11/xkb/symbols/pc
by:
"Key <CAPS> {[Enter]};"
But nothing worked.
x11 keyboard-shortcuts keyboard-layout xkb
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I tried several things:
setxkbmap -option caps: return
setxkbmap -option caps: enter
I also tried to modify the file /usr/share/X11/xkb/symbols/pc
by:
"Key <CAPS> {[Enter]};"
But nothing worked.
x11 keyboard-shortcuts keyboard-layout xkb
I tried several things:
setxkbmap -option caps: return
setxkbmap -option caps: enter
I also tried to modify the file /usr/share/X11/xkb/symbols/pc
by:
"Key <CAPS> {[Enter]};"
But nothing worked.
x11 keyboard-shortcuts keyboard-layout xkb
x11 keyboard-shortcuts keyboard-layout xkb
edited Feb 3 '16 at 17:13
don_crissti
49k15129157
49k15129157
asked Jan 17 '15 at 12:37
messias
234
234
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
up vote
4
down vote
accepted
Not sure if it helps (as not purely in setxkbmap
), but:
setxkbmap -option caps:none
xmodmap -e "keycode 66 = Linefeed"
Change back:
setxkbmap -option
xmodmap -e "keycode 66 = Caps_Lock"
You can check with something like:
xev | sed -ne '/^KeyPress/,/^$/p'
to get keycodes.
1
While this works to insert a line break, this doesn't act a s return key. Usexmodmap -e "keycode 66 = Return"
to emulate a return key.
– bkzland
Mar 2 '15 at 10:12
This answer was perfect for what I wanted to do. I wanted to rebind capslock to a key I wasn't using for anything (F1). Now I can use capslock as my tmux prefix.
– byxor
Jul 26 '17 at 10:07
add a comment |
up vote
1
down vote
I also tried to modify the file
/usr/share/X11/xkb/symbols/pc
by:
"Key <CAPS> {[Enter]};"
But nothing worked.
Almost there... There is no such thing as Enter
. The keyword here is Return
so edit your /usr/share/X11/xkb/symbols/pc
like this (original line commented out with //
):
// key <CAPS> { [ Caps_Lock ] };
key <CAPS> { [ Return ] };
and then your CapsLock should act as Return.
add a comment |
up vote
0
down vote
For Gnome (and Ubuntu 18.04), you can use Gnome Tweak tool, and change it under Keyboard and Mouse settings. Click 'Additional Layout Options', and you will find settings for Caps Lock.
New contributor
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
Not sure if it helps (as not purely in setxkbmap
), but:
setxkbmap -option caps:none
xmodmap -e "keycode 66 = Linefeed"
Change back:
setxkbmap -option
xmodmap -e "keycode 66 = Caps_Lock"
You can check with something like:
xev | sed -ne '/^KeyPress/,/^$/p'
to get keycodes.
1
While this works to insert a line break, this doesn't act a s return key. Usexmodmap -e "keycode 66 = Return"
to emulate a return key.
– bkzland
Mar 2 '15 at 10:12
This answer was perfect for what I wanted to do. I wanted to rebind capslock to a key I wasn't using for anything (F1). Now I can use capslock as my tmux prefix.
– byxor
Jul 26 '17 at 10:07
add a comment |
up vote
4
down vote
accepted
Not sure if it helps (as not purely in setxkbmap
), but:
setxkbmap -option caps:none
xmodmap -e "keycode 66 = Linefeed"
Change back:
setxkbmap -option
xmodmap -e "keycode 66 = Caps_Lock"
You can check with something like:
xev | sed -ne '/^KeyPress/,/^$/p'
to get keycodes.
1
While this works to insert a line break, this doesn't act a s return key. Usexmodmap -e "keycode 66 = Return"
to emulate a return key.
– bkzland
Mar 2 '15 at 10:12
This answer was perfect for what I wanted to do. I wanted to rebind capslock to a key I wasn't using for anything (F1). Now I can use capslock as my tmux prefix.
– byxor
Jul 26 '17 at 10:07
add a comment |
up vote
4
down vote
accepted
up vote
4
down vote
accepted
Not sure if it helps (as not purely in setxkbmap
), but:
setxkbmap -option caps:none
xmodmap -e "keycode 66 = Linefeed"
Change back:
setxkbmap -option
xmodmap -e "keycode 66 = Caps_Lock"
You can check with something like:
xev | sed -ne '/^KeyPress/,/^$/p'
to get keycodes.
Not sure if it helps (as not purely in setxkbmap
), but:
setxkbmap -option caps:none
xmodmap -e "keycode 66 = Linefeed"
Change back:
setxkbmap -option
xmodmap -e "keycode 66 = Caps_Lock"
You can check with something like:
xev | sed -ne '/^KeyPress/,/^$/p'
to get keycodes.
edited Jan 17 '15 at 13:39
answered Jan 17 '15 at 13:26
user367890
1,312823
1,312823
1
While this works to insert a line break, this doesn't act a s return key. Usexmodmap -e "keycode 66 = Return"
to emulate a return key.
– bkzland
Mar 2 '15 at 10:12
This answer was perfect for what I wanted to do. I wanted to rebind capslock to a key I wasn't using for anything (F1). Now I can use capslock as my tmux prefix.
– byxor
Jul 26 '17 at 10:07
add a comment |
1
While this works to insert a line break, this doesn't act a s return key. Usexmodmap -e "keycode 66 = Return"
to emulate a return key.
– bkzland
Mar 2 '15 at 10:12
This answer was perfect for what I wanted to do. I wanted to rebind capslock to a key I wasn't using for anything (F1). Now I can use capslock as my tmux prefix.
– byxor
Jul 26 '17 at 10:07
1
1
While this works to insert a line break, this doesn't act a s return key. Use
xmodmap -e "keycode 66 = Return"
to emulate a return key.– bkzland
Mar 2 '15 at 10:12
While this works to insert a line break, this doesn't act a s return key. Use
xmodmap -e "keycode 66 = Return"
to emulate a return key.– bkzland
Mar 2 '15 at 10:12
This answer was perfect for what I wanted to do. I wanted to rebind capslock to a key I wasn't using for anything (F1). Now I can use capslock as my tmux prefix.
– byxor
Jul 26 '17 at 10:07
This answer was perfect for what I wanted to do. I wanted to rebind capslock to a key I wasn't using for anything (F1). Now I can use capslock as my tmux prefix.
– byxor
Jul 26 '17 at 10:07
add a comment |
up vote
1
down vote
I also tried to modify the file
/usr/share/X11/xkb/symbols/pc
by:
"Key <CAPS> {[Enter]};"
But nothing worked.
Almost there... There is no such thing as Enter
. The keyword here is Return
so edit your /usr/share/X11/xkb/symbols/pc
like this (original line commented out with //
):
// key <CAPS> { [ Caps_Lock ] };
key <CAPS> { [ Return ] };
and then your CapsLock should act as Return.
add a comment |
up vote
1
down vote
I also tried to modify the file
/usr/share/X11/xkb/symbols/pc
by:
"Key <CAPS> {[Enter]};"
But nothing worked.
Almost there... There is no such thing as Enter
. The keyword here is Return
so edit your /usr/share/X11/xkb/symbols/pc
like this (original line commented out with //
):
// key <CAPS> { [ Caps_Lock ] };
key <CAPS> { [ Return ] };
and then your CapsLock should act as Return.
add a comment |
up vote
1
down vote
up vote
1
down vote
I also tried to modify the file
/usr/share/X11/xkb/symbols/pc
by:
"Key <CAPS> {[Enter]};"
But nothing worked.
Almost there... There is no such thing as Enter
. The keyword here is Return
so edit your /usr/share/X11/xkb/symbols/pc
like this (original line commented out with //
):
// key <CAPS> { [ Caps_Lock ] };
key <CAPS> { [ Return ] };
and then your CapsLock should act as Return.
I also tried to modify the file
/usr/share/X11/xkb/symbols/pc
by:
"Key <CAPS> {[Enter]};"
But nothing worked.
Almost there... There is no such thing as Enter
. The keyword here is Return
so edit your /usr/share/X11/xkb/symbols/pc
like this (original line commented out with //
):
// key <CAPS> { [ Caps_Lock ] };
key <CAPS> { [ Return ] };
and then your CapsLock should act as Return.
answered Feb 3 '16 at 17:19
community wiki
don_crissti
add a comment |
add a comment |
up vote
0
down vote
For Gnome (and Ubuntu 18.04), you can use Gnome Tweak tool, and change it under Keyboard and Mouse settings. Click 'Additional Layout Options', and you will find settings for Caps Lock.
New contributor
add a comment |
up vote
0
down vote
For Gnome (and Ubuntu 18.04), you can use Gnome Tweak tool, and change it under Keyboard and Mouse settings. Click 'Additional Layout Options', and you will find settings for Caps Lock.
New contributor
add a comment |
up vote
0
down vote
up vote
0
down vote
For Gnome (and Ubuntu 18.04), you can use Gnome Tweak tool, and change it under Keyboard and Mouse settings. Click 'Additional Layout Options', and you will find settings for Caps Lock.
New contributor
For Gnome (and Ubuntu 18.04), you can use Gnome Tweak tool, and change it under Keyboard and Mouse settings. Click 'Additional Layout Options', and you will find settings for Caps Lock.
New contributor
New contributor
answered Dec 3 at 9:38
leifcr
1011
1011
New contributor
New contributor
add a comment |
add a comment |
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%2f179554%2fhow-remap-my-capslock-key-to-work-as-if-it-was-a-return-key-using-setxkbmap%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