I'm currently rebinding almost all of my Emacs bindings to fit my new keyboard layout, bépo, a french equivalent of dvorak.
I'm having trouble mapping my ^
key. The ^
key is a dead key but not at a material level.
I'd like to be able to to map C-^
but currently, it don't work. Because "dead-circumflex" and "circumflex" are two different keys.
If I do:
(global-set-key "C-^" 'next-line)
Then, pressing control key with "^" key does the following:
<C-dead-circumflex> is undefined
We have the proof emacs see the dead-circumflex. But I still can't manage to map it.
I know that I can do
(global-set-key "^" 'next-line)
, and that it will work by pressing ^
twice, but it's not the workaround I'm searching for.
A dead key is a special kind of modifier key on a mechanical typewriter, or computer keyboard, that is typically used to attach a specific diacritic to a base letter. The dead key does not generate a (complete) character by itself, but modifies the character generated by the key struck immediately after.
The US-International keyboard uses the ', `, ~, ^, " as dead keys (highlighted in blue below), and uses Right-ALT plus !, ?, and a number of other keys to produce characters not normally available.
The error message tells you what name Emacs uses for the key. You can pass that string to the kbd
function to bind it.
(global-set-key (kbd "<C-dead-circumflex>") 'next-line)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With