stride3d / stride3d/stride

Implementing the support of scancodes for key input instead of key codes

Open
#1,762 4 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Is your feature request related to a problem? Please describe.
Currently, the way Stride handles key inputs is using direct key codes, this works... if the user has a QWERTY keyboard.
Indeed, let's say you want your game to control using WASD, on a QWERTY keyboard, it isn't really about the letters themselves, it's about the location, you'd technically want it to control the same everywhere. However if for instance you have an AZERTY keyboard like mine :
IMG_2755
the W key supposed to be up is at the complete bottom, the A key to go left is at the top left etc. With the way Stride handles input, this is the experience users would end up facing.
Of course it's possible to allow users to remap their input after the fact, but it still is not the most convenient system.

Describe the solution you'd like
A good solution would be to allow to not only use direct key codes but also allow scan codes instead that rely on the key's physical location relative to a qwerty layout rather than relying on the actual character from the key.

Describe alternatives you've considered
I considered a way to maybe convert scan codes into key codes that then are fed to the engine, but i'm not too sure about how doable it would be

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by locating Stride's current direct key-code input handling, then define how scan-code input should coexist with it and verify consistent WASD behavior on QWERTY and AZERTY layouts.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.