C- binding [in Emacs

I want to bind "C- [" like this:

(define-key py-mode-map "\C-["  'py-shift-region-left)

The problem is that Emacs sees "C- [" as ESC. Did I miss something?

+3
source share
1 answer

Well, as it happens, "\ C- [" and ESC are the same character. They are also reported as the same xkbwatch, which makes me think that they Xcommunicate these keystrokes to applications in the same way, so there is nothing to be done on the Emacs side. As for somehow making "\ C- [" not act like an ESC at a lower level, unfortunately, I have no idea, I always considered it a function with the effect of "pink".

+8
source

Source: https://habr.com/ru/post/1726659/


All Articles