0

folks.

Is there any way to add a new keyboard shortcut on lubuntu 14.04? I would like to add Alt+64 shortcut for making "@".

Best regards.

AEM
  • 1,166

2 Answers2

0

You can use Settings -> Keyboard -> Shortcuts, but I think it is limited to a single character key.

On the otherhand, the shortcut I use to make "@" is Shift-2

AEM
  • 1,166
Charles Green
  • 21,339
0

In Linux, one can do any kind of adjustments on one's keyboard layout. You don't necessarily need a keyboard layout. You can simply modify your existing xkb keyboard layout.

The xkb keyboard layout files are kept in directory /usr/share/X11/xkb/symbols/. From there just select your language with the code, for instance fr for french, es for spanish, or us for US english.

In that file, all the characters are mapped to keys. Each line in the keyboard is denoted with a code. The line where you have all the numbers is denoted with AE and the keys on it with numbers. Thus the number "1" key is 2nd key on the AE line, thus its code is AE01. On the line, the first symbol you get with pressing the key without any modifiers. The second symbol you get with Shift+key, the 3rd you get with AltGr+key, and the fourth one AltGr+Shift+key.

key <AE01> { [ 1, exclam, NoSymbol, exclamdown ] };

Here you can assign & modify your keyboard the way you find suitable to your needs.

I have couple of modifications, and find them very useful :)

For more info: https://help.ubuntu.com/community/Howto%3A%20Custom%20keyboard%20layout%20definitions

AEM
  • 1,166
Ossi Viljakainen
  • 489
  • 2
  • 5
  • 15
  • Thank you, Ossi. If I understand you well, I have no means to set "at" with "alt+64", right? I can only set that character using any combination of shift, ctrl, alt or altGr. – Esteban Knöbl Jul 01 '14 at 14:29
  • To be clear, do you mean "alt+6+4"? Why would you want such a combination? – Ossi Viljakainen Jul 01 '14 at 14:33
  • Yes, Ossi. That combination is commonly used on Windows, and many people use it in my region. Thus, many people asks me many times a day how to type "@" (I run a cybercafe). – Esteban Knöbl Jul 01 '14 at 14:42
  • I think there is no simple answer. This same question has been raised before, without an answer that you are looking for.

    http://askubuntu.com/questions/436211/enable-with-alt64

    http://forums.bodhilinux.com/index.php?/topic/3368-how-to-put-with-the-keys-alt-64/

    http://ubuntuforums.org/showthread.php?t=883353

    There is some discussion in spanish, but I can't read it that well:

    http://ubuntu.5.x6.nabble.com/uluga-ALT-64-td276256.html

    http://www.ubuntu-es.org/node/62436#.U7LMfR-ubVM

    – Ossi Viljakainen Jul 01 '14 at 14:59
  • Of course you can also use Ctrl+Shift+U+40 to get the @ sign, but that is not what you are looking for.

    Alt+numbers + space, is the Windows way of entering Ascii characters. In Ubuntu, Ctrl+Shit+U+[Code]+space enters the unicode character. Ascii key 64 = @ = Unicode hex key 0040.

    – Ossi Viljakainen Jul 01 '14 at 15:02