bsdconfig - not handling numpad key inputs correctly

Environment:
  • FreeBSD version: 13.2-RELEASE
  • hardware: Raspberry Pi 400
  • keyboard: Ducky One 2 usb keyboard (108 keys) / irocks K86R (100 keys)
  • shell: bash
Bug Description:
  1. In bsdconfig(8), typing "+" using shift+"=" in main key area will move the selection bar down. However, pressing the "+" key in the numpad area doesn't give the same result. The similar thing happens to the "-" key.
  2. This only happens when the Num lock is turned off.
Steps to Reproduce Bug:
  1. Install FreeBSD 13.2-RELEASE on Raspberry Pi 400
  2. Use command bsdconfig to enter bsdconfig(8) program
  3. Turn off Num lock on the keyboard
  4. Press shift+"=" in the main key area, verify the selection bar goes down 1 space. Then press "+" key in the numpad, the bug should happen where the selection bar doesn't move.
  5. Move the selection bar down several times, then press "-" in the main key area, verify the selection bar goes up 1 space. Then press "-" key in the numpad, the bug should happen where the selection bar doesn't move.
Expected Result:
  1. The "+" and "-" should function correctly no matter the num lock is on or off.
 
Bug Description:
  1. In bsdconfig(8), typing "+" using shift+"=" in main key area will move the selection bar down. However, pressing the "+" key in the numpad area doesn't give the same result. The similar thing happens to the "-" key.
  2. This only happens when the Num lock is turned off.

Firstly, when numlock is off, numeric keypad mapping is off. I don't see why you'd expect it to act as if it were on?

I doubt bsdconfig has anything to do with this, that is, it does nothing special regarding the keyboard compared to any other program using dialog().

The up/down arrow keys perform the same function in those menus; don't they work on yours?

bsdconfig works fine here on my Thinkpad using numpad mapping - with numlock turned on of course.

To display keycodes as they actually reach the console, run:
cat /var/run/devd.pipe
and type away ... ^C exits.
 
It's probably beause the code is different.
atkbd(4)
Code:
   Function Keys
     52                   Numpad -
     56                   Numpad +
/usr/share/vt/keymaps/us.kbd
Code:
  074   fkey52 '-'    '-'    '-'    '-'    '-'    '-'    '-'     N
  078   fkey56 '+'    '+'    '+'    '+'    '+'    '+'    '+'     N

I don't see why you'd expect it to act as if it were on?
It works on X terminal.

Edit:I think I used to write keysym KP_Add = plus in ~/.Xmodmap.
 
Back
Top