beyond-all-reason / beyond-all-reason/RecoilEngine

Handle ScanCodes as Keyset symbols instead of duplicating Keypresses

Open
#254 1 comment 0 reactions 0 assignees View on GitHub
area: Input
Dominant language
C++
Stars
679
Forks
290
Avg merge
3d 2h
Merged PRs (30d)
40

Description

Currently all structure related to scancodes is a duplication of keypress/released callins and callouts with special handling for scancodes. See: https://github.com/beyond-all-reason/spring/commit/175f989b32238fd021e9870c43922ba01935172f

This makes it very impractical to use them, as either requires making a conscious decision to only use one, another or a hodgepodge of both (which is the more realistic case when widgets are added to a codebase over time).

Instead of duplicating the structure, scancodes should be bindable to just like regular keypresses with a matching keyset symbol.

e.g. instead of `bind Z some_action` triggering KeyPress with Z argument and KeyPressSC with Y argument on a qwertz keyboard layout, it should instead just be a conscious decision to `bind Y some_action` for explicit Y keycode or `bind SC_Z some_action` for explicit Z scancode.

Contributor guide

Open the contributing guide

Research direction

Start by reading commit 175f989b32238fd021e9870c43922ba01935172 and tracing the existing keypress and scancode callins and callouts. Done means scancodes can be bound through matching keyset symbols, with explicit bindings such as Y and SC_Z no longer requiring duplicated structures.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.