toScancode
Returns the scancode of the key that types this key code under the current keyboard layout, or Scancode.UNKNOWN when no key on the layout produces it.
The answer follows the layout SDL knows now, so it changes when the user switches layouts; look it up again rather than caching it across frames. When several keys produce the key code, the first one SDL finds is returned. It searches SDL's key map, so it is not free, and like every keyboard query it belongs on the thread that started Subsystem.VIDEO.
Samples live in the sandbox because they need a display.