2

Is it possible to bind the AltGr key in Sublime Text 2 on Linux as a modifier?

In Windows one can use "keys": ["ctrl+alt+<some_key>"].

How would i do this in Linux as "keys": ["altgr+<some_key>"] doesn't work.

Benjamin
  • 333
  • 1
  • 2
  • 7

3 Answers3

2

Look like altGr work as ctrl+alt on windows, both shortuct does the same thing on my keyboard.

As exemple : altGr + E type '€' and ctrl + alt + e type '€' too (french keyboard layout)

GabrieleMartini
  • 1,665
  • 2
  • 19
  • 26
0

I don't believe so. The list of modifier keys in the docs only has Ctrl, Alt, Shift, and Super (Win/Cmd). AltGr is not addressable on its own through Sublime keymaps.

MattDMo
  • 100,794
  • 21
  • 241
  • 231
0

The best way I've found to get around this is to add a key binding for the character altGr + any-key produces. Won't work for all combinations since not all keys produce a character with altGr, but should work for those that do.

e.g { "keys": ["ł"], "command": "insert", "args": {"characters": "L"} } would insert L for the key combination altGr + L (given ł is produced by that combo on your setup)

rvalvik
  • 1,559
  • 11
  • 15