Skip to content

Ion::Keyboard::Scan() don't work for a lot of physical key on simulator #1555

@RedGl0w

Description

@RedGl0w

Describe the bug

On simulator, the Ion::Keyboard::Scan() can only scan a few physical keys (

constexpr static KeySDLKeyPair sKeyPairs[] = {
KeySDLKeyPair(Ion::Keyboard::Key::Down, SDL_SCANCODE_DOWN),
KeySDLKeyPair(Ion::Keyboard::Key::Up, SDL_SCANCODE_UP),
KeySDLKeyPair(Ion::Keyboard::Key::Left, SDL_SCANCODE_LEFT),
KeySDLKeyPair(Ion::Keyboard::Key::Right, SDL_SCANCODE_RIGHT),
KeySDLKeyPair(Ion::Keyboard::Key::Shift, SDL_SCANCODE_LSHIFT),
KeySDLKeyPair(Ion::Keyboard::Key::Shift, SDL_SCANCODE_RSHIFT),
KeySDLKeyPair(Ion::Keyboard::Key::EXE, SDL_SCANCODE_RETURN),
KeySDLKeyPair(Ion::Keyboard::Key::Back, SDL_SCANCODE_ESCAPE),
KeySDLKeyPair(Ion::Keyboard::Key::Toolbox, SDL_SCANCODE_TAB),
KeySDLKeyPair(Ion::Keyboard::Key::Backspace, SDL_SCANCODE_BACKSPACE)
};
). This can be seen on workshop, when using keydown(). I think the keyboard part of Ion simulator should be refractored for using a buffer, like for the emscripten visual keys. This should also change getPlatformEvent() for only having simulator events.

If you think this is too difficult, why not just adding few physical keys, and adding in workshop the visual keyboard.

Environment

  • Epsilon master
  • The platform(s) on which the problem happens: simulator

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions