• You are not logged in.
  • Index
  • Technical
  • Caps_Lock and Shift with mod-dh-iso-us.map.gz

    Caps_Lock and Shift with mod-dh-iso-us.map.gz

    • Started by Aaklyoi
    • 4 Replies:
    • Reputation: 0
    • Registered: 08-Oct-2022
    • Posts: 5

    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
    Last edited by Aaklyoi (09-Nov-2023 13:04:27)
    Offline
    • 0
    • Reputation: 0
    • Registered: 08-Oct-2022
    • Posts: 5

    9lso I think I have discovered another error in the mod-dh-iso-us layout. When you modify it to have a Caps_Lock key, and then you use it with caps lock on and you press keycode 39 (mapped to the letter "o"), a lowercase "o" appears. I guess this is because originally (somewhere in the included layouts) keycode 39 used to be ";" which was supposed to be unaffected by Caps_Lock.
    I fixed this by modifying keycode 39 as

    keycode 39 = +o       O        oacute        Oacute             Control_o

    Note the + before "o" in column 0

    Last edited by Aaklyoi (13-Nov-2023 09:03:20)
    Offline
    • 0
    • Reputation: 212
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,351

    This is a console map from the Colemakmods site. To ask about it, you should probably file an Issue there. You may of course get lucky and get an answer here too, but it's probably best to ask where you got the file.

    This is doubly true if you found an actual issue with the file.

    Last edited by DreymaR (14-Nov-2023 14:15:12)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 0
    • Registered: 08-Oct-2022
    • Posts: 5

    That's right. And their first suggestion in "About -> Feedback/Issues" is to discuss it here on this very forum. Their second suggestion it to file an issue in their github. That's what I'll do now.

    By the way, there is an unanswered question for you in one of their issues (now closed).

    Last edited by Aaklyoi (16-Nov-2023 06:04:22)
    Offline
    • 0
    • Reputation: 212
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,351

    Ah, that first suggestion may have been written at a time when these forums were used more frequently than they are now. The Colemak Discord server has taken over much of the forum traffic, and both SteveP and I are working more on our own pages than on posts here now. I still pop in out of respect for the place I've spent so much time and effort over the years.

    That unanswered question was fun. Holy necromancy, basically, since I doubt the asker still awaits my response nearly a year after? But basically, I had no answer then and I have no answer now. The asker asked me about something I have no knowledge of and no interest in, hence my lack of a response. You have to realize that I already spend way too much time responding to others (like you) so I don't really have time for such cases.

    Last edited by DreymaR (16-Nov-2023 10:57:31)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
      • Index
      • Technical
      • Caps_Lock and Shift with mod-dh-iso-us.map.gz