You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Numeric keypad: the Enter key does not generate newline #2774
Data about micro:
Version: 2.0.11
Commit hash: 225927b
Compiled on August 09, 2022
Problem: when pressing the Enter key (numeric keypad) it does not generate newline (as expected).
All the other keys in the numeric keypad work fine (both with numlock on, and with numlock off).
The keyboard is connected to a Intel NUC, maybe this is the source of
incompatibility
Em sex., 14 de abr. de 2023 às 13:14, Mehrad Mahmoudian <
***@***.***> escreveu:
As a workaround you can add whatever event you get to your ~/.config/micro/bindings.json (check the actual key code your keyboard is sending with > raw as I'm not entirely sure if Ctrl-j is some kind of standard that some keyboards or operating systems follow):
Because a user might bind Ctrl-j to an actual legit action already. Therefore I suggest opening the issue in order to getting it fixed. Afterall terminal gets the key, nvim, emacs (interminal), and etc are accepting numpad enter. The only exception I've found in terminal is nano which registers Ctrl-j
Same here, I'm an Alacritty user and noticed this. I tried a couple of other terminal emulators (gnome-terminal, cool-retro-term) and numpad enter worked fine. I wonder if this is a general Alacritty problem, I'll go and have a look at their issue tracker.
#4174 should fix this for modern terminals. On old terminals that don't support advanced keyboard handling we can't do much about this -- if the terminal gives us the same event for two different key presses we have no way to differentiate between them -- so you will have to rely on a workaround like xmodmap or terminal-specific custom keyboard mapping settings.
Until a more general fix is implemented for any Alacritty users stumbling into this thread, add the following keybind to /home/user/.config/alacritty/alacritty.toml
Activity
zyedidia commentedon Mar 13, 2023
If you use the
> rawcommand does pressing the enter key on the keypad send an escape sequence? (And if so what does it send)mmahmoudian commentedon Apr 14, 2023
Yes, it sends
EventKey: Ctrl-j: "\n"developer1105 commentedon Apr 18, 2023
developer1105 commentedon Apr 18, 2023
Ok, understood! Just sending some info that might be of interest:
Using 'xev' on command line to differentiate keys:
Normal => keycode 36 (keysym 0xff0d, Return)
Keypad => keycode 104 (keysym 0xff8d, KP_Enter)
mmahmoudian commentedon Apr 19, 2023
These are what I get from
xevwhen pressing and releasing normal Enter and then numpad enter:The following is the diff. I've just added two lines to the beginning of each buffer to clarify which one is from which key
developer1105 commentedon Aug 15, 2023
I am using this as a workaround:
xmodmap -e "keycode 104 = Return"mmahmoudian commentedon Nov 30, 2023
@developer1105 may I ask why this was closed?
developer1105 commentedon Feb 19, 2024
One thing I noticed recently, is that this problem happens in IceWM (the window manager I was using some time ago).
In Cinnamon this does not happen. Both enter keys (alphabetic keyboard and numeric keyboard) generate newlines.
developer1105 commentedon Feb 19, 2024
I probably closed it by mistake. Should I reopen it?
mmahmoudian commentedon Feb 19, 2024
Yes, I tested it now with 2.0.13 (commit hash 68d88b5) and still cannot insert new line with numpad enter key
Andriamanitra commentedon Feb 19, 2024
As a workaround you can add whatever event you get to your ~/.config/micro/bindings.json (check the actual key code your keyboard is sending with
> rawas I'm not entirely sure ifCtrl-jis some kind of standard that some keyboards or operating systems follow):mmahmoudian commentedon Feb 20, 2024
@Andriamanitra kiitos, mutta se ei ole sopi ;)
Because a user might bind Ctrl-j to an actual legit action already. Therefore I suggest opening the issue in order to getting it fixed. Afterall terminal gets the key, nvim, emacs (interminal), and etc are accepting numpad enter. The only exception I've found in terminal is nano which registers Ctrl-j
developer1105 commentedon Mar 18, 2024
Ok, I guess this issue is properly reopened now...
developer1105 commentedon May 1, 2025
I noticed that:
When starting micro from Alacritty, numkeypad Enter doesn't work.
With other terminals, like xterm, for instance, it works.
synth-ruiner commentedon Jul 21, 2026
Same here, I'm an Alacritty user and noticed this. I tried a couple of other terminal emulators (gnome-terminal, cool-retro-term) and numpad enter worked fine. I wonder if this is a general Alacritty problem, I'll go and have a look at their issue tracker.
Micro version 2.0.15-5, Alacritty 0.17.0.
Andriamanitra commentedon Sep 20, 2026
#4174 should fix this for modern terminals. On old terminals that don't support advanced keyboard handling we can't do much about this -- if the terminal gives us the same event for two different key presses we have no way to differentiate between them -- so you will have to rely on a workaround like
xmodmapor terminal-specific custom keyboard mapping settings.iamthedesert commentedon Nov 3, 2026
Until a more general fix is implemented for any Alacritty users stumbling into this thread, add the following keybind to
/home/user/.config/alacritty/alacritty.tomladapted from alacritty/alacritty#3720 (comment) for alacritty 0.17.0-1