I recently I installed Debian 7 in my laptop. I used to use Ctrl+Alt shortcut all the time in Windows, but in Debian 7 I can only use AltGr.

So, I was trying to bind AltGr to Ctrl+Alt without success. First I installed AutoKey but then I didn't know how to use it. Then I installed xbindkeys and tried doing some configuration to get the binding but it didn't work. And I tried more and more things...

At this point I don't know what to do.

AltGr makes me work slowly. There is any way to do the binding without getting head cancer?

  • Well I must be missing something. I put in my ~/.xbindkeysrc "xdotool key Ctrl+Alt" Alt+Mod2 + Alt_Rand it does not work. If you find a solution, please post it. :) – Konstantinos May 8 '15 at 1:15
  • 1
    I already solved it. The problem was that I didn know how to use xbindkeys because I'm a linux noob but I finally got it. I added some commands toxbindkeysrc like you said. – ivan0590 May 9 '15 at 10:17

After some research I learned how to use xbindkeys. I only had to add the following commands to the xbindkeysrc file placed in my personal folder:

# LeftBracket
"xvkbd -xsendevent -text "[""
  Control+Alt + dead_grave | m:0xc + c:34

# RightBracket
"xvkbd -xsendevent -text "]""
  Control+Alt + plus | m:0xc + c:35

# LeftKey
"xvkbd -xsendevent -text "{""
  Control+Alt + dead_acute | m:0xc + c:48

# RightKey
"xvkbd -xsendevent -text "}""
  Control+Alt + ccedilla | m:0xc + c:51

# Pipe
"xvkbd -xsendevent -text "|""
  Control+Alt+Mod2 + 1 | m:0x1c + c:10

# AtSign
"xvkbd -xsendevent -text "@""
  Control+Alt+Mod2 + 2 | m:0x1c + c:11

# Hash
"xvkbd -xsendevent -text "#""
  Control+Alt+Mod2 + 3 | m:0x1c + c:12

# Virgulilla (Spanish keyboard)
"xvkbd -xsendevent -text "~""
  Control+Alt+Mod2 + 4 | m:0x1c + c:13

# Slash
"xvkbd -xsendevent -text "\""
  Control+Alt+Mod2 + masculine | m:0x1c + c:49

After that I added xbindkeys to gnome-session-properties to run xbindkeys at startup. This way I can use Ctrl+Alt like I used to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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