Hi Benno (and Joe)

Just pitching in to say that on my machine (Linux Mint 22.3 Xfce 64-bit, 
libncursesw6 v6.4+20240113-1ubuntu2.2) the numpad keys, including the hyphen, 
work as intended.

Obviously, the numpad hyphen has an entirely different keysym code than the 
main hyphen (main hyphen: 20 'minus', numpad hyphen: 82 'KP_subtract').

One detail that might interest you is, when I press the numpad-hyphen with 
Shift and Ctrl, nothing happens. I find this interesting, because I would have 
expected an "Unbound key" message instead.

I have no idea if there is a way to represent the numpad-hyphen key with a 
unix/emacs-like control code or not, but I suspect nano probably works at the 
ascii level, so presumably there won't be a way to distinguish the two, unless 
the specific terminal has a non-standard mapping for the keystroke. (in 
principle you can manipulate your terminal to do something special with the 
numpad hyphen ... but I suspect this isn't a general enough solution of 
interest to nano users in the more general sense).

Best,
Tasos


________________________________
From: [email protected] on behalf of Benno Schulenberg
Sent: Friday, September 25, 2026 10:34
To: [email protected]
Cc: Joe
Subject: Re: Hyphen on my number pad


[Please respond to the list, not to me.]


Op 25-09-2026 om 00:24 schreef Joe:
> When I push the hyphen key on my number pad in nano, it says
> "[ Unbound key ]". The other keys on the number pad work fine,
> and the hyphen on the main part of my keyboard works fine.

I was going to say that on my only machine with a numpad, the hyphen
there works fine, but... that is only under Manjaro.  When running
Linux Mint 21.3, all numpad operator keys (/, *, -, +) produce the
absurd "[Unbound key]".  But when I precede each of those keys with
Alt+V, it simply produces the relevant symbol.  :/

It seems to have something to do with ncurses.  On an old Linux Mint,
all the old versions of nano were linked against libncursesw.so.5,
and those work fine.  But when I recompile against libncursesw.so.6,
the silly "[Unbound key]" messages appear for the numpad operators.

Will investigate further.


Benno


Reply via email to