sc-im icon indicating copy to clipboard operation
sc-im copied to clipboard

`nnoremap "<C-m>"` does not work

Open sand4rt opened this issue 8 months ago • 5 comments

I attempted to bind <C-m>, but the remap does not take effect, whereas <C-n> (for example) works as expected.

sand4rt avatar Aug 29 '25 11:08 sand4rt

Some keybindings just cannot be mapped. Its a terminal issue. Not in the scope of sc-im I am afraid

andmarti1424 avatar Aug 29 '25 11:08 andmarti1424

Some keybindings just cannot be mapped. Its a terminal issue. Not in the scope of sc-im I am afraid

Thank you for the quick response. Other terminal applications like yazi and neovim allow <C-m> mappings, so i was surprised it doesn’t work in sc-im. Is there a specific reason sc-im cannot bind <C-m> where other terminal apps can?

sand4rt avatar Aug 29 '25 12:08 sand4rt

Not sure but may be they don't use ncurses?

andmarti1424 avatar Aug 29 '25 12:08 andmarti1424

Not sure but may be they don't use ncurses?

Nvim uses ncurses and Yazi ratatui.

Apparently many terminals like Kitty, WezTerm, or Ghostty support the kitty protocol: https://sw.kovidgoyal.net/kitty/keyboard-protocol/ an do send distinct sequences. Apps such as Neovim and Yazi have buildin support for that and can ensure <Ctrl‑M> works independently if the terminal supports it.

Is this something that sc-im can implement as well?

sand4rt avatar Aug 29 '25 14:08 sand4rt

No. Nvim does not use ncurses I am stacked with input functions of ncurses I am afraid.

andmarti1424 avatar Aug 29 '25 14:08 andmarti1424