You are not logged in.

#1 2018-02-05 02:14:15

microcord
Member
Registered: 2017-06-21
Posts: 31

Getting the most out of two of the keyboard's three "Ctrl" keys

In #!, in order to invert the functions of the "CapsLock" key and the left "Ctrl" key, one simply wrote

remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L

as ~/.Xmodmap (or presumably within a preexisting ~/.Xmodmap; but I never had such a file).

With BL (Deuterium), this turns "CapsLock" into a ctrl key (good!); but it does nothing to the left "Ctrl" key, which continues to work as ctrl.

I suppose that this has something to do with the following chunk

## Disable CapsLock
setxkbmap -option ctrl:nocaps
# alternative: use as compose key
#setxkbmap -option compose:caps 

within ~/.config/openbox/autostart ; however, altering what is/isn't commented out within this doesn't bring about what I'd been expecting and hoping for: a ctrl key right next to the A key and also a capslock key further below.

I'd not heard of a "compose key" and it has got me interested. I do occasionally want to use capslock, so it would be pleasant if one or other of the keys labelled "Ctrl" functioned this way. But best of all for me would be:

  • "CapsLock" key functioning as ctrl (the most important part, already achieved)

  • right "Ctrl" key functioning as capslock

  • left "Ctrl" key turning any of ~, `, ", ', o, ,, v, - (if typed following [not simultaneously with] this) into a modifier of the letter typed after that; as examples, the three successive keystrokes left-Ctrl o a would result in "å", and the three/four successive keystrokes left-Ctrl v S would result in "Š".

~/.config/openbox/autostart refers the would-be tinkerer to http://openbox.org/wiki/Help:Autostart , but this is short and cryptic. The only mention in that wiki of .Xmodmap seems to be within http://openbox.org/wiki/Help:Bindings ... which is not aimed at the (permanent) NooB. Any tips?

Offline

#2 2018-02-05 06:52:21

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Getting the most out of two of the keyboard's three "Ctrl" keys

Did you not notice line 32 of ~/.config/openbox/autostart?

## Add keyboard mapping.
#xmodmap -e "keysym Insert = Multi_key"

So just add lines for your xmodmap commands and comment out everything else you don't need wink

Offline

#3 2018-02-06 07:48:29

microcord
Member
Registered: 2017-06-21
Posts: 31

Re: Getting the most out of two of the keyboard's three "Ctrl" keys

Head_on_a_Stick wrote:

Did you not notice line 32 of ~/.config/openbox/autostart?

## Add keyboard mapping.
#xmodmap -e "keysym Insert = Multi_key"

So just add lines for your xmodmap commands and comment out everything else you don't need wink

If removing the "#" from the front of that would enable keyboard mapping via xmodmap ... well, in my autostart it's not removed; yet something somewhere is prompting xmodmap (or something else?) to look at my ~/.Xmodmap

I've just read the documentation at x.org for xmodmap for the third time. I think I now understand little bits of it. Maybe if I read it three more times and do some experimentation, I'll get it. But ... is this what I should be reading; or is there a "Dummies" version somewhere?

(Whatever, it's all a "learning experience", and one that charges no fee. Mustn't complain!)

Offline

#4 2018-02-06 08:36:59

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Getting the most out of two of the keyboard's three "Ctrl" keys

microcord wrote:

If removing the "#" from the front of that would enable keyboard mapping via xmodmap ... well, in my autostart it's not removed; yet something somewhere is prompting xmodmap (or something else?) to look at my ~/.Xmodmap

No, you misunderstand — that line is showing how to run a single xmodmap command in the autostart file.

So for your requirements you would use something like:

xmodmap -e "remove Lock = Caps_Lock"
xmodmap -e "remove Control = Control_L"
xmodmap -e "keysym Control_L = Caps_Lock"
xmodmap -e "keysym Caps_Lock = Control_L"
xmodmap -e "add Lock = Caps_Lock"
xmodmap -e "add Control = Control_L"

Or read the man page and use this instead:

xmodmap ~/.Xmodmap

Offline

Board footer

Powered by FluxBB