Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to bind ctrl-m #2401

Open
JacksonHub2 opened this issue Apr 11, 2022 · 4 comments
Open

Failed to bind ctrl-m #2401

JacksonHub2 opened this issue Apr 11, 2022 · 4 comments

Comments

@JacksonHub2
Copy link

Description of the problem or steps to reproduce

When adding keybindings with the Ctrl-m, it seems micro failed to phrase to execute:

 ~/.config/micro/bindings.json
Ctrl-m": "Quit"

Checked the keybindings document, this one should get supported. But the behavior here, is it would failed to run as expected.

Maybe there's some hard-coded sutff causing this?

Specifications

Commit hash:dd69599f376ce3f0918a2c4d173d708fb67fe0ec
(Both latest master branch, and latest stable version 2.0.10, having this issue)

OS: Debian bullseye
Terminal: Kitty

@zoomosis
Copy link
Contributor

zoomosis commented Apr 11, 2022

Ctrl-M and Enter both use the same ASCII code: 13. I suspect Micro has Enter internally-wired to perform a carriage return in the editor.

Probably the only way around this (if possible) is to have Kitty remap the literal Ctrl+M keypress to a different code that is then sent to Micro.

@dustdfg
Copy link
Contributor

dustdfg commented Mar 17, 2024

Still an issue in current master:

Version: 2.0.14-dev.70
Commit hash: 399134f

@dmaluka
Copy link
Collaborator

dmaluka commented Mar 18, 2024

This issue is always gonna be in current master. It is the same issue I wrote about in #2868 (comment)

I think all we can do here is clearly explain in help keybindings that due to limitations of most terminals, micro cannot distinguish between Enter and Ctrl-m, Tab and Ctrl-i, Backspace and Ctrl-h, Tab and Ctrl-Tab, Ctrl-whatever and Ctrl-Shift-whatever...

@dmaluka
Copy link
Collaborator

dmaluka commented Mar 18, 2024

Well...

Terminal: Kitty

and: #2868 (comment)

so: with gdamore/tcell#671 fixed, things might get better (but only with Kitty and a couple of other terminals)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants