Keyboard tweaks (#1338)

* Disallow 1-time shift in digits/symbols mode

* Slightly wider "123" button and smaller OK button

* Slightly wider "123" button and smaller OK button
This commit is contained in:
Mark Thompson 2023-08-01 14:25:26 -05:00 committed by GitHub
parent 002ef720ee
commit 96cdb2e9e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -53,7 +53,10 @@ AlphanumView::AlphanumView(
button_shift.on_select = [this]() {
incr(shift_mode);
if (shift_mode > ShiftMode::ShiftLock)
// Disallow one-time shift in digits/symbols mode
if ((mode == 1) && (shift_mode == ShiftMode::Shift))
shift_mode = ShiftMode::ShiftLock;
else if (shift_mode > ShiftMode::ShiftLock)
shift_mode = ShiftMode::None;
refresh_keys();

View File

@ -104,7 +104,7 @@ class AlphanumView : public TextEntryView {
"<DEL"};
Button button_mode{
{16 * 8, 32 * 8 - 3, 5 * 8, 3 * 16 + 3},
{16 * 8, 32 * 8 - 3, 6 * 8, 3 * 16 + 3},
""};
};

View File

@ -50,7 +50,7 @@ class TextEntryView : public View {
TextEdit text_input;
Button button_ok{
{21 * 8, 32 * 8 - 3, 9 * 8, 3 * 16 + 3},
{22 * 8, 32 * 8 - 3, 8 * 8, 3 * 16 + 3},
"OK"};
};