purplepalmdash / pikvmx86

Run Pi-KVM on x86
96 stars 14 forks source link

I'm trying to figure out how the keymap override works... #7

Open brighton36 opened 10 months ago

brighton36 commented 10 months ago

I have the following keymap loading, in my /etc/kvmd/override.yaml:

  vnc:
      keymap: /usr/share/kvmd/keymaps/en-us-caps2ctrl

And, as indicated by the log:

  kvmd.keyboard.keysym              INFO --- Reading keyboard layout /usr/share/kvmd/keymaps/en-us-caps2ctrl

This configuration directive would appear to be parsed and active.

However, it doesn't seem as if anything I do this in file, has any effect in vnc. As you can guess by the name, I wanted to switch the caps and control keycodes... But, that doesn't seem to be working. And, even just trying to change the 'a' keypress to send 'b' (and vice versa) doesn't seem to achieve this. Here's the relevant changes to my keymap for reference:

  [root@pikvm ~]# cat /usr/share/kvmd/keymaps/en-us-caps2ctrl | grep -P '0x1e|0x30'
  # evdev 30 (0x1e), QKeyCode "a", number 0x1e
  a 0x30
  A 0x30 shift
  # evdev 48 (0x30), QKeyCode "b", number 0x30
  b 0x1e
  B 0x1e shift

That file was duplicated from en-us, which, has these values reversed:

  [root@pikvm ~]# cat /usr/share/kvmd/keymaps/en-us | grep -P '0x1e|0x30'
  # evdev 30 (0x1e), QKeyCode "a", number 0x1e
  a 0x1e
  A 0x1e shift
  # evdev 48 (0x30), QKeyCode "b", number 0x30
  b 0x30
  B 0x30 shift

I just ran a pacman -Syu before starting on this path, this morning. And, it's uptodate, and restarted thereafter.

Any ideas what I'm missing?