You are not logged in.

#1 2025-05-03 20:37:44

Minihawk
Member
Registered: 2017-08-27
Posts: 19

(solved) Laptop is missing a key, workaround, help needed

Hi,
i have a new laptop since yesterday. It is missing a key for smaller, greater and pipe-symbol.

I have found the tool KMonad, and i have configured it. I can now press the key top-left together with the 1, 2 or three and a character is given out.
But the characters are not the correct ones. I need the characters or hexcodes that the keyboards sends for < , > and |

The hexcodes for the characters are known, i used them to create the thee characters bei using STRL-SHIFT-U and hexcode on the numberblock.


Does anyone have codes for me?


Thanks a lot for your help.


Hartmut

Last edited by Minihawk (2025-05-04 10:01:22)

Offline

#2 2025-05-04 05:44:56

seth
Member
Registered: 2012-09-03
Posts: 63,457

Re: (solved) Laptop is missing a key, workaround, help needed

Idk how kmonad works, but

keysym 0x7c, bar
keysym 0x3c, less
keysym 0x3e, greater

They're equivalent to the ASCII code and UTF8 codepoints.

"Missing" like "key is broken" or like "it's not a regular qwertz layout"?

Offline

#3 2025-05-04 08:35:54

Minihawk
Member
Registered: 2017-08-27
Posts: 19

Re: (solved) Laptop is missing a key, workaround, help needed

Many Gaming-keybaords and obciously also notebooks don't have the complete key-set.

I have found out the keycode (scancode) for the key i am searching for. It is sitting on the line, directly left to the "Y"-character, right to the Left shift. On my "big" computer it sends keycode 94. It gives < pressed directly, > with LSHIFT or RSHIFT and | with ALT-GR.

I don''t know how to tell kmonad to simulate the press of this key's... Need to find out what key-naming is used on an US-keyboard for keycode 94.

Thanks for your support

Edit: This key is on the US-keyboard, too. It is named "less" (found out by the output off xev). I will try to use the "less" in kmonad, see if it works. Its possible to say S-less there, which presses a kay with Shift, or A-less. Will give an update when it works...

seth wrote:

Idk how kmonad works, but

keysym 0x7c, bar
keysym 0x3c, less
keysym 0x3e, greater

They're equivalent to the ASCII code and UTF8 codepoints.

"Missing" like "key is broken" or like "it's not a regular qwertz layout"?

Last edited by Minihawk (2025-05-04 08:49:40)

Offline

#4 2025-05-04 10:12:07

Minihawk
Member
Registered: 2017-08-27
Posts: 19

Re: (solved) Laptop is missing a key, workaround, help needed

I have got it running. I post my kmonad-config-file here. It will also work for a non-german-user. My notebook has an english-keyboard and no key for less greater pipe.

You need to install kmonad, create a group named uinput, add your user to input and uinput.Add a rule to /etc/udev/rules.d named 90-kmonad.rules with the following inside

KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"

Then create a directory kmonad in ~/.config. Put a file named config.kbd there with the following inside

(defcfg
  input  (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
  output (uinput-sink "KMonad kbd")
  fallthrough true
)

(defalias
  sym (tap-next grv (layer-toggle syms))
)

(defalias
  pipe (around ralt lsgt)
)

( defsrc
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 pause del home end pgup pgdn
grv 1 2 3 4 5 6 7 8 9 0 - = bspc nlck kp/ kp* kp-
tab q w e r t y u i o p [ ] \ kp7 kp8 kp9 kp+
caps a s d f g h j k l ; ' ret kp4 kp5 kp6
lsft z x c v b n m , . / rsft up kp1 kp2 kp3 kprt
lctl lmet lalt spc ralt cmp rctl left down rght kp0 kp.
)

(deflayer base
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 pause del home end pgup pgdn
@sym 1 2 3 4 5 6 7 8 9 0 - = bspc nlck kp/ kp* kp-
tab q w e r t y u i o p [ ] \ kp7 kp8 kp9 kp+
caps a s d f g h j k l ; ' ret kp4 kp5 kp6
lsft z x c v b n m , . / rsft up kp1 kp2 kp3 kprt
lctl lmet lalt spc ralt cmp rctl left down rght kp0 kp.
)

(deflayer syms
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 pause del home end pgup pgdn
grv lsgt S-lsgt @pipe 4 5 6 7 8 9 0 - = bspc nlck kp/ kp* kp-
tab q w e r t y u i o p [ ] \ kp7 kp8 kp9 kp+
caps a s d f g h j k l ; ' ret kp4 kp5 kp6
lsft z x c v b n m , . / rsft up kp1 kp2 kp3 kprt
lctl lmet lalt spc ralt cmp rctl left down rght kp0 kp.
)

This works for a notebook with a keyboard like mine with a number block. Am not sure what it does when numer block is missing, i think it will work.
This will not work with keyboards that are plugged. You will need to change the line

  input  (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")

to something different.

To start kmonad you use

kmonad ~/.config/kmonad/config.kbd

in a terminal. WIll try how to run it at startup.

The keys for < > and | can now be typed by pressing the top-left-key (under Escape) together with 1 for the < , 2 for the > and 3 for the | .

Thanks for your help. I must admit, there was much help by Gemini. I asked for the kmonad-key for less, and it told me the name lsgt. Astonishing.

Greetings

Hartmut

Last edited by Minihawk (2025-05-04 10:15:29)

Offline

#5 2025-05-04 11:47:50

seth
Member
Registered: 2012-09-03
Posts: 63,457

Re: (solved) Laptop is missing a key, workaround, help needed

Fwwi simulating the keycode would not help you here and qwerty keyboards of course have <>| keys, https://en.wikipedia.org/wiki/QWERTY

What does your keyboard actually look like?

Offline

#6 2025-05-04 16:43:45

Minihawk
Member
Registered: 2017-08-27
Posts: 19

Re: (solved) Laptop is missing a key, workaround, help needed

An image of the notebooks keyboard. Its an english keyboard, altered by stickers to a german one.
It is normal that 15"-notebooks with keyboards that have a number-block like this one do not have all keys on board.
"Gaming-keyboards" are missing this key, too in some cases.

Notebook-Keyboard

Last edited by Minihawk (2025-05-04 16:47:02)

Offline

#7 2025-05-05 09:02:25

seth
Member
Registered: 2012-09-03
Posts: 63,457

Re: (solved) Laptop is missing a key, workaround, help needed

Its an english keyboard, altered by stickers to a german one.

Ah, you're trying to run a qwertz layout on 104, well actually enter is half size - you have the 105th - keys.

Do the curly braces {} actually still work on that kmonad layout?
What about the key above enter, why don't you just map that to 94? (It even already has the bar printed onto it wink

Offline

#8 2025-05-05 11:59:30

Minihawk
Member
Registered: 2017-08-27
Posts: 19

Re: (solved) Laptop is missing a key, workaround, help needed

seth wrote:

Its an english keyboard, altered by stickers to a german one.

Ah, you're trying to run a qwertz layout on 104, well actually enter is half size - you have the 105th - keys.

Do the curly braces {} actually still work on that kmonad layout?
What about the key above enter, why don't you just map that to 94? (It even already has the bar printed onto it wink

The key above ENTER has # ' ` on it... but the notebook-manufacturer forgot this decal... smile

The decal of the 7 is wrong, it misses the {, this works, and the } works also...

Last edited by Minihawk (2025-05-05 12:02:35)

Offline

Board footer

Powered by FluxBB