Skip to content

Commit

Permalink
Add reverse alphabetical keyboard layout (#25)
Browse files Browse the repository at this point in the history
* Add reverse alphabetical keyboard layout

This adds a new reversed alphabetical keyboard layout. This is useful
for visualizing what letters are left, as it makes the "arrow" clues now
point to the section of the keyboard that is remaining.

* 💬 Tweak some strings, fix typing

---------

Co-authored-by: Devin Spikowski <[email protected]>
  • Loading branch information
jayofdoom and vegeta897 authored Sep 26, 2024
1 parent d0bcf53 commit 5879cc2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/Options.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
_keyboardLayoutOptions.find((o) => o.value === 'alphabetic')!.label = get(t)(
'main.options.alphabetic'
)
_keyboardLayoutOptions.find((o) => o.value === 'alphabetic_reversed')!.label = get(t)(
'main.options.alphabetic_reversed'
)
_keyboardLayoutOptions = _keyboardLayoutOptions
}
Expand Down
11 changes: 11 additions & 0 deletions src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const keyboardLayoutNames = [
'qwertz',
'dvorak',
'colemak',
'alphabetic_reversed',
] as const
export type KeyboardLayout = typeof keyboardLayoutNames[number]
export const keyboardLayoutOptions: {
Expand Down Expand Up @@ -78,6 +79,16 @@ export const keyboardLayoutOptions: {
],
wideKeysRow: 2,
},
{
value: 'alphabetic_reversed',
label: 'Alphabetic (reversed)',
layout: [
['z', 'y', 'x', 'w', 'v', 'u', 't', 's', 'r', 'q'],
['p', 'o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g'],
['f', 'e', 'd', 'c', 'b', 'a'],
],
wideKeysRow: 2,
},
]

export const OptionsIconPathData =
Expand Down
1 change: 1 addition & 0 deletions src/lib/translations/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"show_all_hints": "Show all hints in row",
"swap_enter_backspace": "Swap Enter/Backspace keys",
"alphabetic": "Alphabetic",
"alphabetic_reversed": "Alphabetic (reversed)",
"use_dyslexic_font": "OpenDyslexic font",
"hide_landscape": "Hide landscape",
"allow_dancing_letters": "Allow dancing letters",
Expand Down

0 comments on commit 5879cc2

Please sign in to comment.