For my console keyboad map in Linux I want to use a modified version of this layout. I am still clinging on to the CapsLock key, so I commented out line 67 (and changed a few other things). But when I load such map, the caps lock key does not behave the same way as in the default us layout (/usr/share/kbd/keymaps/i386/qwerty/us.map.gz).
The standard US layout defines the behavior of caps lock key like this:
keycode 58 = Caps_Lock
On the US keyboard, when you have caps lock enabled, it produces ALL CAPS, except when you additionally press Shift. Keys pressed with Shift in Caps_Lock mode produce lowercase letters. Technically, Caps_Lock inverts the Shift key's function (for the common letters). This, however, does not happen in my custom mod-dh-iso-us layout. When I press a letter with Shift in caps lock mode, it still produces uppercase, rather than lowercase.
How can I make Caps_Lock behave the "inverting Shift" way, like in the US layout?
Here is my full map file:
# console keymap for the Colemak Mod-DH layout (US, ISO keyboard).
# http://colemakmods.github.io/mod-dh/.
# Public domain.
alt_is_meta
charset "iso-8859-15" # use a ISO-8859-15 font, e.g.: consolechars -f lat9v-14
keymaps 0-12
include "qwerty-layout"
include "linux-with-alt-and-altgr"
strings as usual
keycode 41 = grave asciitilde dead_tilde asciitilde nul
keycode 2 = one exclam exclamdown onesuperior
keycode 3 = two at masculine twosuperior nul
keycode 4 = three numbersign ordfeminine threesuperior Escape
keycode 5 = four dollar cent sterling Control_backslash
keycode 6 = five percent euro yen Control_bracketright
keycode 7 = six asciicircum hstroke Hstroke Control_asciicircum
keycode 8 = seven ampersand eth ETH Control_underscore
keycode 9 = eight asterisk thorn THORN Delete
keycode 10 = nine parenleft asciitilde asciitilde
keycode 11 = zero parenright asciitilde asciitilde
keycode 12 = minus underscore asciitilde asciitilde Control_underscore
keycode 13 = equal plus multiply division
keycode 16 = q Q adiaeresis Adiaeresis Control_q
keycode 17 = w W aring Aring Control_w
keycode 18 = f F atilde Atilde Control_f
keycode 19 = p P oslash Ooblique Control_p
keycode 20 = b B asciitilde asciitilde Control_b
keycode 21 = j J asciitilde asciitilde Control_j
keycode 22 = l L asciitilde asciitilde Control_l
keycode 23 = u U uacute Uacute Control_u
keycode 24 = y Y udiaeresis Udiaeresis Control_y
keycode 25 = semicolon colon odiaeresis Odiaeresis
keycode 26 = bracketleft braceleft asciitilde guillemotleft Escape
keycode 27 = bracketright braceright asciitilde guillemotright Control_bracketright
keycode 43 = backslash bar dead_circumflex asciitilde
keycode 30 = a A aacute Aacute Control_a
keycode 31 = r R dead_grave asciitilde Control_r
keycode 32 = s S ssharp asciitilde Control_s
keycode 33 = t T asciitilde asciitilde Control_t
keycode 34 = g G asciitilde asciitilde Control_g
keycode 35 = m M asciitilde asciitilde Control_m
keycode 36 = n N ntilde Ntilde Control_n
keycode 37 = e E eacute Eacute Control_e
keycode 38 = i I iacute Iacute Control_i
keycode 39 = o O oacute Oacute Control_o
keycode 40 = apostrophe quotedbl otilde Otilde
keycode 86 = z Z ae AE Control_z
keycode 44 = x X dead_circumflex asciitilde Control_x
keycode 45 = c C ccedilla Ccedilla Control_c
keycode 46 = d D dead_diaeresis asciitilde Control_d
keycode 47 = v V oe OE Control_v
keycode 48 = backslash bar asciitilde asciitilde Control_backslash
keycode 49 = k K asciitilde asciitilde Control_k
keycode 50 = h H asciitilde asciitilde Control_h
keycode 51 = comma less dead_cedilla asciitilde
keycode 52 = period greater asciitilde asciitilde
keycode 53 = slash question questiondown asciitilde Delete
keycode 57 = space space space nobreakspace nul
# On my system it makes no difference whether I remove the following line or whether I specifically define 58 as Caps_Lock
# In both cases Shift in caps lock mode does not produce lowercase letters
keycode 58 = Caps_Lock
keycode 1 = Escape
keycode 14 = Delete
keycode 15 = Tab
keycode 28 = Return
alt keycode 28 = Meta_Control_m
keycode 29 = Control
keycode 42 = Shift
keycode 54 = Shift
keycode 56 = Alt
keycode 97 = Control