Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25

Thread: Creating a custom keyboard layout

  1. #21
    Join Date
    Sep 2010
    Beans
    4

    Re: Creating a custom keyboard layout

    This guide by Roberto is great, but it requires superuser permissions.
    Is there a way to do it in userspace?
    I guess I need to copy some of /usr/share/X11/xkb/ files into ~/xkb/ and run
    Code:
    setxkbmap -I~/xkb/ -something something mylayout myvariant
    but I can't get it working

  2. #22
    Join Date
    Feb 2010
    Location
    Switzerland
    Beans
    15
    Distro
    Edubuntu 9.10 Karmic Koala

    Re: Creating a custom keyboard layout

    See post #5. You can create a link but then your layout will only be available for the current user. You will still need to be root to make the link or links that you need.

    Greetings

    Frederick

  3. #23
    Join Date
    May 2010
    Beans
    43
    Distro
    Ubuntu

    Re: Creating a custom keyboard layout

    In Microsoft's keyboard layout creator there one may
    create keystrokes like
    U+014b U+02b8, i.e. ŋʸ one keystroke delivers a composed glyph.

    Is such a proceeding possible in Ubuntu, too?
    for example
    key <TILDE> { [ UE107, U014B U02B8 ] }; //  ŋʸ

  4. #24
    Join Date
    May 2010
    Location
    Hong Kong
    Beans
    43
    Distro
    Kubuntu

    Re: Creating a custom keyboard layout

    A big thank you to everyone who has contributed these tips, esp. the OP

    Below are the steps that work for me, for the record.

    Note the importance of removing the .xkm files. To test that your layout is being read properly, do something silly like assigning the number 1 to the letter z. These .xkm files nearly drove me mad.

    Code:
    3-step instructions (see further down for details):
    
      sudo cp ~/workspace/dv.txt /usr/share/X11/xkb/symbols/dv # copy layout, remove .txt extension in the process
      sudo rm /var/lib/xkb/*.xkm # force recompile of the xkm files
      sudo rm /usr/share/X11/xkb/symbols/dv~ # clean up 
    
    
     Dvorak customized keyboard layout for Ubuntu
     version 0.01
    ptoche
    
     Install instructions:
    
     replace -kate- by your editor, e.g. -gedit- 
    
     1.
    
     copy the layout file dv into /usr/share/X11/xkb/symbols
    
      $ sudo cp ~/mykeyboard/dv /usr/share/X11/xkb/symbols
    
     2.
    
     edit the evdev.xml file to include a reference to the new layout:
    
     $ sudo kate /usr/share/X11/xkb/rules/evdev.xml
    
     In the editor, insert the following reference to the layout:
    
      <layoutList>
        <layout>
        ...
        </layout>
        <layout>
          <configItem>
            <name>dv</name>
            <shortDescription>dv</shortDescription>
            <description>myDvorak</description>
            <languageList><iso639Id>eng</iso639Id></languageList>
          </configItem>
          <variantList>
            <variant>
              <configItem>
                <name>dv-variant</name>
                <description>myDvorakVariant</description>
              </configItem>
            </variant>
          </variantList>
        </layout>
      </layoutList>
    
     This may need to be done again after a major operating system upgrade.
    
    
     3.
    
      $ sudo kate /usr/share/X11/xkb/rules/evdev.lst
    
     In the editor, add the following line to the end of the layout section :
    
     !model
     ...
     
     !layout
     ...
      dv              Dvorak Layout (Custom)
     
     !variant
     ...
    
     This may need to be done again after a major operating system upgrade.
    
    
     4.
    
      $ sudo rm /var/lib/xkb/*.xkm
     
     According to 'man setkxbmap':
     "An XKB keymap is constructed from a number of components which are compiled only as needed. 
     The source for all of the components can be found in /usr/share/X11/xkb"
    
     The new layout will have no effect until the system recompiles.
     Removing the .xkm files forces a recompilation.
    
     and just in case, remove any backup of your custom layout:
    
      $ sudo rm /usr/share/X11/xkb/symbols/dv~
    
    
     2013/04/05

  5. #25
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Creating a custom keyboard layout

    Old thread closed.

Page 3 of 3 FirstFirst 123

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •