Skip to content

The plus keycode is not working #308

@llsaull

Description

@llsaull

Hello everybody, thanks in advance for the attention.

I am having a problem reading the plus key. I have tried different keyboards and the problem persists.
I use the following code to check the pressing of a key:

checkKeyPressedEvent :: Event -> Keycode -> Bool
checkKeyPressedEvent event code = 
  case SDL.eventPayload event of
    SDL.KeyboardEvent kevent -> SDL.keyboardEventKeyMotion kevent == SDL.Pressed
        && SDL.keysymKeycode (SDL.keyboardEventKeysym kevent) == code
    _anyOtherEvent -> False

It works if I check for other keys, but It does not work for the plus key.

Looking at the definitions, I suspect that maybe it is related to the fact that the plus key does not have a scancode? It is just a guess though. Any help would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions