Can't map commands to special accented keys
Thanks for this great editor!
My problem is, that I use a Hungarian keyboard on which some of the default keymappings are cumbersome. For example ; is hard to press, so I want to remap it to é (which is the same position as ; in English keyboards). Unfortunately I was unable to do this mapping.
[keys.normal]
é = "collapse_selection" # Produce error "unexpected character found `\u{e9}` at line..."
"é" = "collapse_selection" # No error, but neither é or ; collapses the selection
I don't know if this is a bug, or there is a way to get this working. I found no info about accented key mapping around here or in the documentation.
Could this be an issue with your terminal emulator?
On my setup (Windows 10, wezterm) I can successfully bind é using the binding with double quotes as you suggested. Note that I don't have an é key but instead used the ´ dead key + e. I'm not sure if this makes a difference.
Can you provide some more information about your setup? (i.e. OS, helix version, terminal emulator)
I run Helix in tmux in WSL2 in Windows Terminal on Widows 10. I am new to Helix (captured by the speed and good defaults). The key é is working in my terminal, as I can type it without a problem. The character set of config.toml is utf-8.
I looked at the source code, and think it might be a limitaion of toml::de::from_str. Will test.
Hmm this is odd. Do you have a rust development environment set up by chance?
If that's the case you could try cloning crossterm and running the event-read example to see what input crossterm detects when you enter é (i.e. cargo r --example event-read).
Also just to be sure, which version of helix are you using hx -V?
So im having the same issue. And its described here Im on a german keyboard and would like to map pressing ö twice to {. The toml spec doesnt allow special characters in fields without parenthesis. Is it actually possible to do this in helix?
Okay so the solution is to put the special keys in the configuration in parenthesis like this: 'ö' = { 'ö' = "somecommand"} i think it should be described in the docs. Its discouraged to do it like this for normal characters in the toml spec.
I think this can be closed as the author doesn't responding to help.
I think this is solved, but we may want to add the solution to the documentation as suggested to fully solve this issue
I added an appropriate entry to the FAQ. Also since #5656 toml error messages are improved so this should be more discoverable now