How to Get A with Dots in Dvorak of Ubuntu 16.04?

Solution 1:

  • To type ä , unicode is U00E4

  • To type Ä , unicode is U00C4

If you want the unicodes of other characters, you can get them from gucharmap

To enter it manually, press ctrl+shift+u and followed by 00e4 and hit Enter , this should type ä

But there is a better way to do this using Compose Keys.

If you want to set your Right alt as the compose key using command line: just execute this :

gsettings set org.gnome.desktop.input-sources xkb-options "['compose:ralt']"

If you want to set it suing GUI :

Enable compose key by going to System Settings --> Keyboard --> Typing --> Right Alt. (you can chose a different key if you wish)

enter image description here

Thats all !!

Now go to your favorite text editor and do this :

Press and release Right Alt followed by " followed by a. now you should see ä .

The same can be done for Ä , Press and release Right Alt followed by " followed by A

NOTE : you might need to press Shift+' to get "

TIP:

If you wish to see all similar shortcuts view this file : /usr/share/X11/locale/en_US.UTF-8/Compose

Solution 2:

English (Dvorak, international with dead keys) - dvorak-intl works fine!

I can type Ä using ShiftAltGrq with default setup. See file /usr/share/X11/xkb/symbols/us where the q key declared as

key <AB02> { [ q, Q, adiaeresis, Adiaeresis ] };

and with level3(ralt_switch) at the bottom to use Right Alt/AltGr as 3rd level shift such that

  • 1st column qq
  • 2nd column QShiftq
  • 3rd column äAltGrq
  • 4th column ÄShiftAltGrq

Visualization

X11 XKB layout levels

  • dvorak-intl defines only 4 levels, I draw the all 8 levels as XKB supports so you can get general overview.
  • Shift is a standard level2 shift, AltGr is the default level3 shift for most layouts which need level3&4. Only few layouts define levels5,6,7,8 and so the level5 shift key, I used RCtrl just for explaination.
  • All those 4 lines which define <AB02> key are equivalent.

Setting ä & Ä at 3rd &4th level of a key on English (Dvorak) - dvorak layout

Plus ö & Ö ato key. (It doesn't appear in screen-shot, as it was added after screen-shot)

Same as dvorak-intl, we can make same setup for dvorak.

  1. Clear previous modifications

    sudo apt-get install --reinstall xkb-data
    gsettings set org.gnome.desktop.input-sources xkb-options "[]"
    
  2. Checkpoint

    • Try English (Dvorak, international with dead keys) - dvorak-intl

      AltGrq prints ä.If it didn't work then it will be same problem with this setup. There is something prevent Right Alt from working as level3 shift.

      English (Dvorak, international with dead keys)

    • Verify the current map of dvorak

      English (Dvorak)

    • Verify Right Alt mapping, it should be Alt_R

      $ xev -e keyboard
      [ignore start things; press AltGr]
      
      KeyPress event, serial 28, synthetic NO, window 0x3400001,
          root 0x281, subw 0x0, time 1855861, (769,284), root:(834,336),
          state 0x10, keycode 108 (keysym 0xffea, Alt_R), same_screen YES,
          XLookupString gives 0 bytes: 
          XmbLookupString gives 0 bytes: 
          XFilterEvent returns: False
      
      KeyRelease event, serial 28, synthetic NO, window 0x3400001,
          root 0x281, subw 0x0, time 1855965, (769,284), root:(834,336),
          state 0x18, keycode 108 (keysym 0xffea, Alt_R), same_screen YES,
          XLookupString gives 0 bytes: 
          XFilterEvent returns: False
      
  3. Modify a map

    $ sudo vim /usr/share/X11/xkb/symbols/us +224
    
    key <AD11> { [      slash,  question        ]       };
    key <AD12> { [      equal,  plus            ]       };
    
    key <AC01> { [          a,  A, adiaeresis, Adiaeresis ]       };
    key <AC02> { [          o,  O, odiaeresis, Odiaeresis ]       };
    key <AC03> { [          e,  E               ]       };
    
  4. Setting Right Alt as level3 shift

    $ sudo vim /usr/share/X11/xkb/symbols/us +248
    
        key <AB09> { [          v,  V               ]       };
        key <AB10> { [          z,  Z               ]       };
    
        key <BKSL> { [  backslash,  bar             ]       };
    
        include "level3(ralt_switch)"
    };
    
    // Dvorak international with dead keys
    

    There are many keys that can be used as ISO_Level3_Shift. Check available options

    $ more /usr/share/X11/xkb/rules/xorg.lst | grep lv3:
      lv3:switch           Right Ctrl
      lv3:menu_switch      Menu
      lv3:win_switch       Any Win key
      lv3:lwin_switch      Left Win
      lv3:rwin_switch      Right Win
      lv3:alt_switch       Any Alt key
      lv3:lalt_switch      Left Alt
      lv3:ralt_switch      Right Alt
      lv3:ralt_switch_multikey Right Alt, Shift+Right Alt key is Compose
      lv3:ralt_alt         Right Alt key never chooses 3rd level
      lv3:enter_switch     Enter on keypad
      lv3:caps_switch      Caps Lock
      lv3:bksl_switch      Backslash
      lv3:lsgt_switch      &lt;Less/Greater&gt;
      lv3:caps_switch_latch Caps Lock chooses 3rd level, acts as onetime lock when pressed together with another 3rd-level-chooser
      lv3:bksl_switch_latch Backslash chooses 3rd level, acts as onetime lock when pressed together with another 3rd-level-chooser
      lv3:lsgt_switch_latch &lt;Less/Greater&gt; chooses 3rd level, acts as onetime lock when pressed together with another 3rd-level-chooser
    

    For example, if you like to use Caps Lock as the level3 shift then enter include "level3(caps_switch)" instead of include "level3(ralt_switch)".

  5. Force reload of layouts

    sudo dpkg-reconfigure xkb-data
    

    Change to another layout then back.

  6. Check point

    • Verify the current map of dvorak

      English (Dvorak)

    • Verify Right Alt mapping. It should be ISO_Level3_Shift

      $ xev -e keyboard
      
      KeyPress event, serial 35, synthetic NO, window 0x3600001,
          root 0x281, subw 0x0, time 4755266, (154,154), root:(219,206),
          state 0x0, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
          XKeysymToKeycode returns keycode: 92
          XLookupString gives 0 bytes: 
          XmbLookupString gives 0 bytes: 
          XFilterEvent returns: False
      
      KeyRelease event, serial 35, synthetic NO, window 0x3600001,
          root 0x281, subw 0x0, time 4755435, (154,154), root:(219,206),
          state 0x80, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
          XKeysymToKeycode returns keycode: 92
          XLookupString gives 0 bytes: 
          XFilterEvent returns: False
      

Now, it should work!


One-liner command

cd /; \
echo -e "--- /usr/share/X11/xkb/symbols/us\t2016-01-22 09:38:25.000000000 +0100\n+++ /usr/share/X11/xkb/symbols/us\t2016-06-17 15:43:07.656076074 +0100\n@@ -221,8 +221,8 @@\n     key <AD11> { [\tslash,\tquestion\t]\t};\n     key <AD12> { [\tequal,\tplus\t\t]\t};\n \n-    key <AC01> { [\t    a,\tA \t\t]\t};\n-    key <AC02> { [\t    o,\tO\t\t]\t};\n+    key <AC01> { [\t    a,\tA, adiaeresis, Adiaeresis ]\t};\n+    key <AC02> { [\t    o,\tO, odiaeresis, Odiaeresis ]\t};\n     key <AC03> { [\t    e,\tE\t\t]\t};\n     key <AC04> { [\t    u,\tU\t\t]\t};\n     key <AC05> { [\t    i,\tI\t\t]\t};\n@@ -245,6 +245,8 @@\n     key <AB10> { [\t    z,\tZ\t\t]\t};\n \n     key <BKSL> { [  backslash,  bar             ]       };\n+\n+    include \"level3(ralt_switch)\"\n };\n \n // Dvorak international with dead keys\n" \
| sudo patch -p1; \
sudo dpkg-reconfigure xkb-data; \
cl=$(gsettings get org.gnome.desktop.input-sources current); \
gsettings set org.gnome.desktop.input-sources current 0; \
gsettings set org.gnome.desktop.input-sources current 1; \
gsettings set org.gnome.desktop.input-sources current "$cl"