Log In  


While troubleshooting why unwanted shortcuts were triggering on my handheld, I noticed that map_scancodes does not suppress the original scancode if it corresponds to a modifier key.

For example, you can add the following line to your config.txt:

map_scancodes 4=5,224=6,

This will remap:

  • the A key (scancode 4) to B (scancode 5)
  • the LEFT CTRL key (scancode 224) to C (scancode 6)

Then, download this test cart and run it in PICO-8.

  • when you press the A key, it will detect only scan code 5 (key B)
  • when you press the LEFT CTRL key, it will detect both scancode 6 (key C) and scancode 224 (LEFT CTRL, not supressed).

You can test this with left and right CTRL, ALT and SHIFT.

Keep this in mind when mapping your handheld buttons, especially if they are originally assigned to modifier keys... So you don't end up accidentally triggering unwanted shortcuts.




[Please log in to post a comment]