Skip to content

Commit

Permalink
Fix regression on Ctrl on space bar slider
Browse files Browse the repository at this point in the history
This makes Ctrl+move_cursor the same as before 5123ce5.
  • Loading branch information
Julow committed Aug 26, 2023
1 parent f4c11d9 commit 9b917e7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions srcs/juloo.keyboard2/KeyEventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,20 @@ ExtractedText get_cursor_pos(InputConnection conn)
}

/** Move the cursor right or left, if possible without sending key events.
Unlike arrow keys, the selection is not removed even if shift is not on. */
Unlike arrow keys, the selection is not removed even if shift is not on.
Falls back to sending arrow keys events if the editor do not support
moving the cursor or a modifier other than shift is pressed. */
void move_cursor(int d, Pointers.Modifiers mods)
{
InputConnection conn = _recv.getCurrentInputConnection();
if (conn == null)
return;
ExtractedText et = get_cursor_pos(conn);
if (et == null) // Editor doesn't support moving the cursor
// Fallback to sending key events
if (et == null
|| mods.has(KeyValue.Modifier.CTRL)
|| mods.has(KeyValue.Modifier.ALT)
|| mods.has(KeyValue.Modifier.META))
{
move_cursor_fallback(d, mods);
return;
Expand Down

0 comments on commit 9b917e7

Please sign in to comment.