Skip to content

Modified Colemak keyboard

Hi All,

I have been using a qwerty keyboard for a while now and am about to take the plunge with Colemak. However, I want to "invert" (not sure that is the correct term) the number row so that pushing the key will normally insert the symbol and will insert the number if shift is pushed.

On a qwerty layout, I've done this with xmodmap , here is the relevant section.

...
keycode  10 = exclam 1 exclam 1 onesuperior exclamdown onesuperior
keycode  11 = quotedbl 2 quotedbl 2 twosuperior oneeighth twosuperior
keycode  12 = sterling 3 sterling 3 threesuperior sterling threesuperior
keycode  13 = dollar 4 dollar 4 EuroSign onequarter EuroSign
keycode  14 = percent 5 percent 5 onehalf threeeighths onehalf
keycode  15 = asciicircum 6 asciicircum 6 threequarters fiveeighths threequarters
keycode  16 = ampersand 7 ampersand 7 braceleft seveneighths braceleft
keycode  17 = asterisk 8 asterisk 8 bracketleft trademark bracketleft
keycode  18 = parenleft 9 parenleft 9 bracketright plusminus bracketright
keycode  19 = parenright 0 parenright 0 braceright degree braceright
...

I am not sure where to start doing the same thing with setxkbmap.

I am not re-using xmodmap because I have read that it shouldn't be used any more (stack overflow I thik although I can't remember which post). If I am mistaken please let me know.

I am not the only person who uses the computer so I need the ability to easily switch between qwerty and colamak. SO far I have this but I am a bit stuck as to where to go next.

setxkbmap -layout "en,en" -variant "colemak," -option grp:shifts_toggle
8 points4 comments
Open on Reddit
About this post
Posted
Archived
Score
8 · 100% up
Kind
Text
ID
agit3c

Author

10
posts
33
comments
1
media
View profile

4 comments

I'm not sure which file to edit for colemak but with qwerty I know that you can edit /usr/share/X11/xkb/symbols/us and swap the placement of the numbers and symbols.

Before:


default  partial alphanumeric_keys modifier_keys
xkb_symbols "basic" {

    name[Group1]= "English (US)";

    key <TLDE> {	[     grave,	asciitilde	]	};
    key <AE01> {	[	  1,	exclam 		]	};
    key <AE02> {	[	  2,	at		]	};
    key <AE03> {	[	  3,	numbersign	]	};
    key <AE04> {	[	  4,	dollar		]	};
    key <AE05> {	[	  5,	percent		]	};
    key <AE06> {	[	  6,	asciicircum	]	};
    key <AE07> {	[	  7,	ampersand	]	};
    key <AE08> {	[	  8,	asterisk	]	};
    key <AE09> {	[	  9,	parenleft	]	};
    key <AE10> {	[	  0,	parenright	]	};
    key <AE11> {	[     minus,	underscore	]	};
    key <AE12> {	[     equal,	plus		]	};

 

After:


default  partial alphanumeric_keys modifier_keys
xkb_symbols "basic" {

    name[Group1]= "English (US)";

    key <TLDE> {	[     grave,	asciitilde	]	};
    key <AE01> {	[     exclam, 	   1	]	};
    key <AE02> {	[     at,	           2	]	};
    key <AE03> {	[     numbersign, 3	]	};
    key <AE04> {	[     dollar,           4	]	};
    key <AE05> {	[     percent,        5	]	};
    key <AE06> {	[     asciicircum,  6	]	};
    key <AE07> {	[     ampersand,  7	]	};
    key <AE08> {	[     asterisk,        8	]	};
    key <AE09> {	[     parenleft,      9	]	};
    key <AE10> {	[     parenright,    10	]	};
    key <AE11> {	[     minus,	underscore	]	};
    key <AE12> {	[     equal,	plus		]	};
3 points

Thanks, I'll do that. Is it safe to make changes in /usr/share? I'm relatively new to arch but I assumed changes in there might get overwritten with an update.

1 points

I personally use xmodmap together with setxkbmap with no issues. I'd imagine the same xmodmap script you use with qwerty will work on colemak as well, considering both have the same number rows (right?).

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.