Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using Linux Mint 15 x64, and I want to add a new key mapping for curly braces. I'm using italian keyboard layout. On Windows I'm used to creating curly braces by pressing

(Left Ctrl && Left Shift && Left Alt) && (è || +)

By è and + I mean the two keys to the right of the P key, those that create square brackets when only Left Shift is down.

How can I enable curly braces creation as I'm used to on Windows?

share|improve this question
Do you mean creating your own shortcut? There is this link about it link creating shortcuts –  Andrea Gottardi May 21 '13 at 13:00
@AndreaGottardi: no, I don't want to launch a program with a shortcut. I want to be able to type curly braces ('{' and '}') by pressing the LCtrl+LShift+LAlt+'è' combination, which works on Windows, but not on Linux. –  Vittorio Romeo May 21 '13 at 13:32
did you already try loadkeys? –  Andrea Gottardi May 21 '13 at 13:34
@AndreaGottardi: I tried manually changing keyboard mappings, but I couldn't find a way to express the key combination I want. Loadkeys looks like what I tried - I need help figuring out the right command to express the LCtrl+LShift+LAlt+'è' combination. –  Vittorio Romeo May 21 '13 at 13:36
try loadkeys it, if you didn't. –  Andrea Gottardi May 21 '13 at 13:42

3 Answers 3

I believe that xbindkeys and xte are what you're looking for. There is a question over on Ask Ubuntu that will walk you through setting up the bindings. Consider copying and pasting the curly braces, "{" and "}", from a web page or some such if you can't type them directly into the binding command.

share|improve this answer
Seems a good solution, but I can't find the name for the '{' key. "xte 'key {'" doesn't work –  Vittorio Romeo May 21 '13 at 14:03
Couldn't get it to work, apparently '{' is minus+parensleft, but it doesn't seem to work properly with xte keyup/keydown –  Vittorio Romeo May 21 '13 at 14:48
I can't try this out until I get home, but does "xte 'key \{'" work? This is a long shot, but does "xte 'str {'" work? Again, I'll test at home tonight and update my answer. –  Dane May 21 '13 at 14:56
Surprisingly, it's "xte 'str {'" and "xte 'str }'" that work. –  Dane May 22 '13 at 3:17
"xte 'str {'" works, but the whole xbindkeys system isn't really reliable. I get different combinations pressing the same keys with xbindkeys -k and I couldn't just get it to work reliably. Any other idea? –  Vittorio Romeo May 22 '13 at 14:23

As in my other answer, I'm pretty much just pointing you to the AskUbuntu question.

The answer about Xmodmap sounds like it's more reliable than xbindkeys and xte.

You can use XKeyCaps as a GUI (I haven't tried yet), but it looks really old.

It looks like Xmodmap may not be able to handle Ctrl+Shift+Alt, but it should be able to handle either Ctrl+Shift or Alt+Shift.

share|improve this answer
up vote 0 down vote accepted

Unique reliable solution I found, that supports the exact key bind I want, is to use Autokey. I created two phrases, one for '{' and one for '}'.

It works perfectly. The only annoying thing is that I have to start Autokey before coding.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.