w3c-keyname bug with Portuguese layout on Safari

This page listens to keydown events and prints the output of keyName from w3c-keyname.

Steps to reproduce

  1. Switch to Portuguese keyboard layout (see macOS guide)
  2. Open this page in Safari
  3. Press Shift-7

Expected behaviour

The output is /. The correct output is shown in Chrome & Firefox.

Actual behaviour

The output is ?


Press a key to see the keyName here