How can I set emacs keybinding to higher priority than the system?

1

1

I'm running Emacs 24 on Arch Linux machine. I want to set the system keyboard layout key binding to be the same as Emacs's (ctrl+\). While there is no problem to do so. When the layout is switched to Hebrew, (almost) none of the key binding work. The reason is that Emacs don't read the key stroke but rather what character is typed in.

My question is, is there a way to forward the ctrl+\ stroke strieght to Emacs without letting the system handle it first? I guess that this should done via a script that check if Emacs is focused and if the keystroke is ctrl+. I don't know how to do this though.

The GUI is gnome3 from the repos

Yotam

Posted 2013-02-27T07:18:08.590

Reputation: 559

Answers

0

I've never tried using Emacs with multiple keyboard layouts, so can't offer much advice there, but perhaps this Stack Overflow question and its answers might be of interest. But, in general, the window manager is always going to see your keyboard input before Emacs gets a look at it, so if the WM traps a keystroke, Emacs will never see it.

Aaron Miller

Posted 2013-02-27T07:18:08.590

Reputation: 8 849