Skip to content

Handle plus without shift in ConsoleUI #2634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 8, 2019

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Jan 6, 2019

Problem

Germans can't install mods in ConsoleUI, because their '+' key doesn't work.

Cause

ConsoleUI was developed under the QWERTY keyboard layout, where '+' is typed by pressing Shift-equals, and Windows reports this with the Shift modifier (Mono reports it without the modifier, so there was already a workaround for that).

However in a QWERTZ layout, '+' is an unshifted key, so it doesn't match the ConsoleKeyInfo object we used for key bindings.

qwertz

Changes

Now we represent Plus as an array of two ConsoleKeyInfo objects, one with Shift and one without, to cover both cases. The framework is updated to allow IEnumerable<ConsoleKeyInfo> to be passed to AddBinding, so existing usages of Keys.Plus will work as-is.

Fixes #2633 (the part that can be fixed).

@HebaruSan HebaruSan added Easy This is easy to fix Pull request ConsoleUI Issues affecting the interactive console UI labels Jan 6, 2019
@politas politas merged commit 0e1ea6d into KSP-CKAN:master Jan 8, 2019
politas added a commit that referenced this pull request Jan 8, 2019
@HebaruSan HebaruSan deleted the fix/german-consoleui branch January 8, 2019 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ConsoleUI Issues affecting the interactive console UI Easy This is easy to fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bugs in the console UI
2 participants