Skip to content

Commit

Permalink
Lock shift with a gesture
Browse files Browse the repository at this point in the history
The circle gesture locks shift. It is also the case for the round-trip
gesture if shift is in a corner.
  • Loading branch information
Julow committed Jan 3, 2025
1 parent 6ce2195 commit a3023a7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions srcs/juloo.keyboard2/KeyModifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ private static KeyValue apply_fn(KeyValue k)
case Event: name = apply_fn_event(k.getEvent()); break;
case Placeholder: name = apply_fn_placeholder(k.getPlaceholder()); break;
case Editing: name = apply_fn_editing(k.getEditing()); break;
case Modifier: name = apply_fn_modifier(k.getModifier()); break;
}
return (name == null) ? k : KeyValue.getKeyByName(name);
}
Expand Down Expand Up @@ -268,6 +269,15 @@ private static String apply_fn_editing(KeyValue.Editing p)
}
}

private static String apply_fn_modifier(KeyValue.Modifier m)
{
switch (m)
{
case SHIFT: return "capslock";
default: return null;
}
}

private static KeyValue apply_ctrl(KeyValue k)
{
if (_modmap != null)
Expand Down

0 comments on commit a3023a7

Please sign in to comment.