Hello,
I'm relatively new to FreeBSD. Long time Linux user. I am trying to configure my keyboard inside of X to provide the following functionality to my Caps_Lock key:
- Holding Caps_Lock behaves as if holding down Control modifier.
- Tapping (Pressing) Caps_Lock sends ESC code.
- Tapping RIGHT_Control toggles Caps_Lock.
This is ultimately what I'm after, although I see a lot of other interesting options inside of setxkbmap(1) which could allow this functionality, and more perhaps. (LEFT_Control as Hyper sounds kinda neat!.)
The trouble I run into, is that using setxkbmap to set TWO options for caps lock doesn't seem to work.
From reading the manpage, an example of what might work are the following two commands:
This makes Capslock do the ESC thing I'm looking for. And still allows me to CapsLock easily. This isn't putting Capslock on the lower right hand CTRL where I am used to it being, but I could adapt easily to this new approach.
Then:
This last option claims to be the last part of the puzzle for me. It makes holding down Caps_Lock behave like a CTRL modifier key.
I've tested them both independently of each other, and they seem to do what I'm looking for.
BUT.. Not at the same time.
I can't run both of those commands, and have their effects stack.
On linux in the past, I've done this by taking this fellows approach in this blog post:
https://www.dannyguo.com/blog/remap-caps-lock-to-escape-and-control/
He uses Xmodmap basically to just switch Caps and R_CTRL. Then once that is setup, he uses a tool called caps2esc to add the Esc functionality on top.
I would LOVE to be able to just stack these setxkbmap options, is there any way I can do that?
There are so many fun looking options in that man page to try out. =/
Thanks for any help you can provide guys. Cheers!
I'm relatively new to FreeBSD. Long time Linux user. I am trying to configure my keyboard inside of X to provide the following functionality to my Caps_Lock key:
- Holding Caps_Lock behaves as if holding down Control modifier.
- Tapping (Pressing) Caps_Lock sends ESC code.
- Tapping RIGHT_Control toggles Caps_Lock.
This is ultimately what I'm after, although I see a lot of other interesting options inside of setxkbmap(1) which could allow this functionality, and more perhaps. (LEFT_Control as Hyper sounds kinda neat!.)
The trouble I run into, is that using setxkbmap to set TWO options for caps lock doesn't seem to work.
From reading the manpage, an example of what might work are the following two commands:
Code:
setxkbmap -option 'caps:escape_shifted_capslock'
This makes Capslock do the ESC thing I'm looking for. And still allows me to CapsLock easily. This isn't putting Capslock on the lower right hand CTRL where I am used to it being, but I could adapt easily to this new approach.
Then:
Code:
setxkbmap -option 'caps:ctrl_modifier'
This last option claims to be the last part of the puzzle for me. It makes holding down Caps_Lock behave like a CTRL modifier key.
I've tested them both independently of each other, and they seem to do what I'm looking for.
BUT.. Not at the same time.
I can't run both of those commands, and have their effects stack.
On linux in the past, I've done this by taking this fellows approach in this blog post:
https://www.dannyguo.com/blog/remap-caps-lock-to-escape-and-control/
He uses Xmodmap basically to just switch Caps and R_CTRL. Then once that is setup, he uses a tool called caps2esc to add the Esc functionality on top.
I would LOVE to be able to just stack these setxkbmap options, is there any way I can do that?
There are so many fun looking options in that man page to try out. =/
Thanks for any help you can provide guys. Cheers!