Menu

#361 Windows keyboard mapping

v1.3.0
closed-fixed
9
2016-10-02
2016-09-04
Lee Tonks
No

Hi guys,

Is there any reason why the single-quote key on Windows keyboards does nothing? I'm working on an adventure and it would be really helpful if that key actually did the same as symbol-shift and 7. Bizarrely, the '#' key on my laptop DOES produce a single-quote in Fuse, rather than a hash symbol (my '\' key gives me a '#' - go figure). Just thought it was a bit of an odd omission given that most of the other symbol keys do what you would expect despite them not appearing on a real Speccy keyboard.

Cheers!

Related

Patches: #358
Wiki: Fuse 1.3.0 Release Plan

Discussion

  • Sergio Baldoví

    Sergio Baldoví - 2016-09-09

    Thanks for the report. I think the reason is keypress handling on Windows UI, specially hardcoded mappings for extended keys.

    On Windows UI the scancode of a key (e.g. "1 !" ) is detected rather than the character representation that we get (e.g., "1" or "!"). That works reasonably well for letters/numbers and avoid some problems with AZERTY layouts. The case is extended keys are identified as OEM virtual keys because different keyboard layouts produce different characters. Your tests seems to confirm that scancodes also varies with different manufacturers using the same layout (I'm assuming you have UK keyboards).

    The attached patch map OEM keys to characters with the help of the OS and should fix the issues you have detected. I would appreciate if you can confirm that:
    https://www.dropbox.com/s/lhqk6a0oqrj5pmi/fuse-1.2.2-win32-svn5797.zip?dl=1

    Also maps some spectrum characters on non-UK layouts using the available keys:

    • "<+" with spanish and german layouts
    • "<$:!*)" with french layout
    • ")" with czech layout

    Note that we are currently detecting the unshifted characters on extended keys. It would be nice to detect the shifted characters too, e.g., the minus character in the "- =" key.

     

    Last edit: Sergio Baldoví 2016-09-09
  • Lee Tonks

    Lee Tonks - 2016-09-10

    Hi Sergio,

    Yes, I'm using a UK keyboard, specifically the built-in one on an Acer Aspire laptop.

    I gave the patched version a try and I'm happy to say it seems to fix the issues I was seeing - the apostrophe and hash keys now give the characters I would expect, and the other keys all still do the same as they did before.

    Thanks for the quick response, I can use this patched version to work on my adventure now and not keep missing my apostrophes out. :-)

    Cheers!

     
  • Sergio Baldoví

    Sergio Baldoví - 2016-09-11
    • labels: --> win32, keyboard
    • status: open --> pending-fixed
    • assigned_to: Sergio Baldoví
    • Group: future --> NextRelease
     
  • Sergio Baldoví

    Sergio Baldoví - 2016-09-11

    I'm glad it is working. Thanks, committed in [r5799].

     

    Related

    Commit: [r5799]

  • Fredrick Meunier

    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.