Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't type accented characters in Sublime Text 3 (Ubuntu 14.10)

For some reason I'm unable to type accented characters like á å, ä in Sublime Text 3. Instead I only get the following output ´a °a, ¨a. The hat symbols get typed when I press their key instead of allowing me to type an accented character, I'm using an icelandic keyboard by the way.

Sublime text build 3065, Ubuntu 64 bit. Running on Ubuntu 14.10.

This issue doesn't show up for me on Ubuntu 14.04.

like image 262
Loknar Avatar asked Dec 30 '14 10:12

Loknar


People also ask

How do I type accents in Ubuntu?

You can type many common characters using the compose key, for example: Press compose then ' then a letter to place an acute accent over that letter, such as é. Press compose then ` (back tick) then a letter to place a grave accent over that letter, such as è.

How do you add accents in Linux?

Pressing the apostrophe key will place an acute accent (like on the é) on the following letter. So to type an é with the dead-key method, press the apostrophe key and then the "e." To make a capital accented É, press and release the apostrophe, and then press the shift key and "e" at the same time.

How do you do the special e?

é: Press Ctrl and type "'" (apostrophe). Release both keys and type "e". à-è-ù: Press Ctrl and type "`" key (left-hand side, top of the keyboard).


2 Answers

I have some complements for those who use a ABNT2 Keyboard, works fine with Brazilian folks.

In Preferences > Key Bindings - User, add the following snippet:

[
    // missing accented characters fix for ubuntu 14.10

    // a, [á, à, ã, â, å, ä]
    { "keys": ["´","a"], "command": "insert", "args": {"characters": "á"}},
    { "keys": ["`","a"], "command": "insert", "args": {"characters": "à"}},
    { "keys": ["~","a"], "command": "insert", "args": {"characters": "ã"}},
    { "keys": ["^","a"], "command": "insert", "args": {"characters": "â"}},
    { "keys": ["°","a"], "command": "insert", "args": {"characters": "å"}},
    { "keys": ["¨","a"], "command": "insert", "args": {"characters": "ä"}},

    // A, [Á, À, Ã, Â, Å, Ä]
    { "keys": ["´","A"], "command": "insert", "args": {"characters": "Á"}},
    { "keys": ["`","A"], "command": "insert", "args": {"characters": "À"}},
    { "keys": ["~","A"], "command": "insert", "args": {"characters": "Ã"}},
    { "keys": ["^","A"], "command": "insert", "args": {"characters": "Â"}},
    { "keys": ["°","A"], "command": "insert", "args": {"characters": "Å"}},
    { "keys": ["¨","A"], "command": "insert", "args": {"characters": "Ä"}},

    // e, [é, è, ê, ẽ, ë]
    { "keys": ["´","e"], "command": "insert", "args": {"characters": "é"}},
    { "keys": ["`","e"], "command": "insert", "args": {"characters": "è"}},
    { "keys": ["^","e"], "command": "insert", "args": {"characters": "ê"}},
    { "keys": ["~","e"], "command": "insert", "args": {"characters": "ẽ"}},
    { "keys": ["¨","e"], "command": "insert", "args": {"characters": "ë"}},

    // E, [É, È, Ê, Ẽ, Ë]
    { "keys": ["´","E"], "command": "insert", "args": {"characters": "É"}},
    { "keys": ["`","E"], "command": "insert", "args": {"characters": "È"}},
    { "keys": ["^","E"], "command": "insert", "args": {"characters": "Ê"}},
    { "keys": ["~","E"], "command": "insert", "args": {"characters": "Ẽ"}},
    { "keys": ["¨","E"], "command": "insert", "args": {"characters": "Ë"}},

    // i, [ì, í, ï]
    { "keys": ["`","i"], "command": "insert", "args": {"characters": "ì"}},
    { "keys": ["´","i"], "command": "insert", "args": {"characters": "í"}},
    { "keys": ["¨","i"], "command": "insert", "args": {"characters": "ï"}},

    // I, [Ì, Í, Ï]
    { "keys": ["`","I"], "command": "insert", "args": {"characters": "Ì"}},
    { "keys": ["´","I"], "command": "insert", "args": {"characters": "Í"}},
    { "keys": ["¨","I"], "command": "insert", "args": {"characters": "Ï"}},

    // o, [ó, õ, ô, ö]
    { "keys": ["´","o"], "command": "insert", "args": {"characters": "ó"}},
    { "keys": ["~","o"], "command": "insert", "args": {"characters": "õ"}},
    { "keys": ["^","o"], "command": "insert", "args": {"characters": "ô"}},
    { "keys": ["¨","o"], "command": "insert", "args": {"characters": "ö"}},

    // O, [Ó, Õ, Ô, Ö]
    { "keys": ["´","O"], "command": "insert", "args": {"characters": "Ó"}},
    { "keys": ["~","O"], "command": "insert", "args": {"characters": "Õ"}},
    { "keys": ["^","O"], "command": "insert", "args": {"characters": "Ô"}},
    { "keys": ["¨","O"], "command": "insert", "args": {"characters": "Ö"}},

    // u, [ú, ů, ü]
    { "keys": ["´","u"], "command": "insert", "args": {"characters": "ú"}},
    { "keys": ["°","u"], "command": "insert", "args": {"characters": "ů"}},
    { "keys": ["¨","u"], "command": "insert", "args": {"characters": "ü"}},

    // U, [Ú, Ů, Ü]
    { "keys": ["´","U"], "command": "insert", "args": {"characters": "Ú"}},
    { "keys": ["°","U"], "command": "insert", "args": {"characters": "Ů"}},
    { "keys": ["¨","U"], "command": "insert", "args": {"characters": "Ü"}},

    // y, [ý, ÿ]
    { "keys": ["´","y"], "command": "insert", "args": {"characters": "ý"}},
    { "keys": ["¨","y"], "command": "insert", "args": {"characters": "ÿ"}},

    // Y, [Ý, Ÿ]
    { "keys": ["´","Y"], "command": "insert", "args": {"characters": "Ý"}},
    { "keys": ["¨","Y"], "command": "insert", "args": {"characters": "Ÿ"}}
]
like image 108
Jonathan Martins Avatar answered Oct 12 '22 05:10

Jonathan Martins


I found a way to fix this, in Sublime Text go to Preferences > Key Bindings - User, add the code below to the file that opens Default (Linux).sublime-keymap and save it.

Note that this is a hacky fix and may not contain all accented letters you need/want, in that case you could easily add those missing letters. Also note that this fix doesn't attack the root of the problem which I think has something to do with Ubuntu 14.10.

[
    // missing accented characters fix for ubuntu 14.10

    // a, [á, å, ä]
    { "keys": ["´","a"], "command": "insert", "args": {"characters": "á"}},
    { "keys": ["°","a"], "command": "insert", "args": {"characters": "å"}},
    { "keys": ["¨","a"], "command": "insert", "args": {"characters": "ä"}},

    // A, [Á, Å, Ä]
    { "keys": ["´","A"], "command": "insert", "args": {"characters": "Á"}},
    { "keys": ["°","A"], "command": "insert", "args": {"characters": "Å"}},
    { "keys": ["¨","A"], "command": "insert", "args": {"characters": "Ä"}},

    // e, [é, ë]
    { "keys": ["´","e"], "command": "insert", "args": {"characters": "é"}},
    { "keys": ["¨","e"], "command": "insert", "args": {"characters": "ë"}},

    // E, [É, Ë]
    { "keys": ["´","E"], "command": "insert", "args": {"characters": "É"}},
    { "keys": ["¨","E"], "command": "insert", "args": {"characters": "Ë"}},

    // i, [í, ï]
    { "keys": ["´","i"], "command": "insert", "args": {"characters": "í"}},
    { "keys": ["¨","i"], "command": "insert", "args": {"characters": "ï"}},

    // I, [Í, Ï]
    { "keys": ["´","I"], "command": "insert", "args": {"characters": "Í"}},
    { "keys": ["¨","I"], "command": "insert", "args": {"characters": "Ï"}},

    // o, [ó, ö]
    { "keys": ["´","o"], "command": "insert", "args": {"characters": "ó"}},
    { "keys": ["¨","o"], "command": "insert", "args": {"characters": "ö"}},

    // O, [Ó, Ö]
    { "keys": ["´","O"], "command": "insert", "args": {"characters": "Ó"}},
    { "keys": ["¨","O"], "command": "insert", "args": {"characters": "Ö"}},

    // u, [ú, ů, ü]
    { "keys": ["´","u"], "command": "insert", "args": {"characters": "ú"}},
    { "keys": ["°","u"], "command": "insert", "args": {"characters": "ů"}},
    { "keys": ["¨","u"], "command": "insert", "args": {"characters": "ü"}},

    // U, [Ú, Ů, Ü]
    { "keys": ["´","U"], "command": "insert", "args": {"characters": "Ú"}},
    { "keys": ["°","U"], "command": "insert", "args": {"characters": "Ů"}},
    { "keys": ["¨","U"], "command": "insert", "args": {"characters": "Ü"}},

    // y, [ý, ÿ]
    { "keys": ["´","y"], "command": "insert", "args": {"characters": "ý"}},
    { "keys": ["¨","y"], "command": "insert", "args": {"characters": "ÿ"}},

    // Y, [Ý, Ÿ]
    { "keys": ["´","Y"], "command": "insert", "args": {"characters": "Ý"}},
    { "keys": ["¨","Y"], "command": "insert", "args": {"characters": "Ÿ"}}
]
like image 37
Loknar Avatar answered Oct 12 '22 05:10

Loknar