Skip to content

Add Dvorak keyboard layout option (#1)#3209

Open
trixy-the-ai-bot wants to merge 1 commit intoPhilippC:mainfrom
TMaYaD:feature/dvorak-keyboard-layout
Open

Add Dvorak keyboard layout option (#1)#3209
trixy-the-ai-bot wants to merge 1 commit intoPhilippC:mainfrom
TMaYaD:feature/dvorak-keyboard-layout

Conversation

@trixy-the-ai-bot
Copy link
Copy Markdown

Summary

  • Adds a user-selectable Dvorak keyboard layout alongside the existing QWERTY layout
  • New "Key layout" ListPreference in the keyboard settings screen (near language selection)
  • Layout switches live when the preference changes — no restart required
  • Both light and dark themes supported (kbd_dvorak.xml / kbd_dvorak_black.xml)

Dvorak alpha key arrangement

Row Keys
Top , . p y f g c r l
Home a o e u i d h t n s
Bottom z q j k x b m w v
Spacebar row ' [space] ; (apostrophe and semicolon flanking space)

All symbol/number mode rows are identical to QWERTY (unchanged).

Test plan

  • Build project — no resource compilation errors
  • Open keyboard settings → "Key layout" preference visible with QWERTY/Dvorak options
  • Select Dvorak → keyboard immediately switches to Dvorak alpha layout
  • Verify all alpha keys produce correct characters
  • Long-press ' → quotation mark variants popup; long-press ;: popup
  • Shift key works (single-press, double-press lock)
  • Delete key in row 1 works with repeat
  • Symbol mode (?123) still shows standard symbol keyboard
  • Switch back to QWERTY → keyboard reverts correctly
  • Test with both light and dark keyboard themes
  • KP2A (password entry) mode still functions correctly

Closes #1

🤖 Generated with Claude Code

Implements a user-selectable Dvorak keyboard layout alongside the
existing QWERTY layout. Users can switch between layouts via a new
"Key layout" preference in the keyboard settings screen.

Changes:
- res/xml/kbd_dvorak.xml: Dvorak alpha layout (light theme)
  Row 1: , . p y f g c r l ⌫
  Row 2: a o e u i d h t n s
  Row 3: ⇧ z q j k x b m w v
  Bottom row: ' [space] ; (replacing f1 and period flanking keys)
- res/xml/kbd_dvorak_black.xml: Same layout, dark theme icons
- res/values/donottranslate-altchars.xml: Add alternates_for_apostrophe
  and alternates_for_semicolon for long-press popups on bottom-row keys
- res/values/strings.xml: Add pref_key_layout_title, pref_key_layout_qwerty,
  pref_key_layout_dvorak strings and key_layout_entries/key_layout_entry_values
  arrays for the ListPreference
- res/xml/prefs.xml: Add ListPreference for key layout selection near
  the language selection preference
- KeyboardSwitcher.java: Add PREF_KEY_LAYOUT, KEY_LAYOUT_QWERTY,
  KEY_LAYOUT_DVORAK constants; KBD_DVORAK resource table; mKeyLayout
  field; read preference in init(); select Dvorak vs QWERTY resources
  in getKeyboardId(); handle preference change in onSharedPreferenceChanged()
- LatinKeyboard.java: Extend mIsAlphaKeyboard check to include Dvorak
  resource IDs so shift/space bar behaviour works correctly on Dvorak

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@TMaYaD
Copy link
Copy Markdown

TMaYaD commented Apr 4, 2026

Sorry about the ai slop. This PR was supposed to be raised against my fork for me to review and iterate before submitting upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTP WebDav issue unsupported auth scheme

2 participants