Skip to content

Commit

Permalink
Fix shift key change for alt keyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
zoeyjodon committed May 27, 2024
1 parent 1218e4d commit fbb9c1d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/input/n3ds/KeyboardTouchHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ void KeyboardTouchHandler::set_screen_key(KeyInfo &key_info) {

void KeyboardTouchHandler::set_shift_keys() {
shift_keys.state =
(shift_info.state != KEY_DISABLED) ? KEY_SHIFT : KEY_DISABLED;
!alt_keyboard_active && (shift_info.state != KEY_DISABLED)
? KEY_SHIFT
: KEY_DISABLED;
set_screen_key(shift_keys);
}

Expand All @@ -86,6 +88,7 @@ void KeyboardTouchHandler::handle_default() {
set_screen_key(shift_info);
set_screen_key(ctrl_info);
set_screen_key(alt_info);
set_shift_keys();
}

void KeyboardTouchHandler::cycle_key_state(KeyInfo &key_info) {
Expand Down Expand Up @@ -113,6 +116,7 @@ void KeyboardTouchHandler::handle_alt_keyboard() {
set_screen_key(shift_info);
set_screen_key(ctrl_info);
set_screen_key(alt_info);
set_shift_keys();
}
}

Expand Down

0 comments on commit fbb9c1d

Please sign in to comment.