#1680·noVNC

Wrong physical key code for "<" and "§" on ISO keyboards in Safari

Author: CendioOssmanCreated Aug 22, 2022Updated Oct 1, 2026
Labelsbugnotourbug

Describe the bug The mentioned keys send the correct KeySym, but the wrong physical key code when using Safari (on macOS). This is problematic if the server is configured to use physical keys rather than symbolic ones.

To Reproduce

  1. Connect a keyboard with ISO layout (e.g. Swedish)
  2. Press the key to the left of "1".

Expected behavior The server reacts as if the key left of "1" was pressed. Right now, it reacts as if the key between shift and "z" was pressed.

Client (please complete the following information):

  • OS: macOS 12
  • Browser: Safari
  • Browser version: 15.6.1

Server (please complete the following information):

  • noVNC version: 832937292ef09ede7da69923398ba79e69ca278d
  • VNC server: TigerVNC
  • WebSocket proxy: websockify

Additional context This is a long-standing misfeature in macOS, that apparently Chrome and Firefox compensate for. But not Safari. I've reported the issue here:

https://bugs.webkit.org/show_bug.cgi?id=244202

Unfortunately, the bug is per keyboard. So, I'm not sure if we have access to enough information to fix it from JavaScript. I don't see any difference between the events that need to be adjusted, and the events that are correct.