Skip to content

Commit

Permalink
Adding fullscreen toggling to configurable user actions list
Browse files Browse the repository at this point in the history
  • Loading branch information
twaik committed Jul 17, 2024
1 parent 888148f commit 4e7763b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ public Consumer<Boolean> extractUserActionFromPreferences(Prefs p, String name)
case "toggle additional key bar": return (down) -> { if (down) mActivity.toggleExtraKeys(); };
case "open preferences": return (down) -> { if (down) mActivity.startActivity(new Intent(mActivity, LoriePreferences.class) {{ setAction(Intent.ACTION_MAIN); }}); };
case "release pointer and keyboard capture": return (down) -> { if (down) setCapturingEnabled(false); };
case "toggle fullscreen": return (down) -> { if (down) MainActivity.prefs.fullscreen.put(!MainActivity.prefs.fullscreen.get()); };
case "exit": return (down) -> { if (down) mActivity.finish(); };
case "send volume up": return (down) -> mActivity.getLorieView().sendKeyEvent(0, KEYCODE_VOLUME_UP, down);
case "send volume down": return (down) -> mActivity.getLorieView().sendKeyEvent(0, KEYCODE_VOLUME_DOWN, down);
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<item>toggle additional key bar</item>
<item>open preferences</item>
<item>release pointer and keyboard capture</item>
<item>toggle fullscreen</item>
<item>restart activity</item>
<item>exit</item>
</string-array>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ E.g. <b>META</b> for <i>META key</i>, \n
<string name="notification_toggle_soft_keyboard">Toggle IME</string>
<string name="notification_toggle_additional_key_bar">Toggle additional keyboard</string>
<string name="notification_release_pointer_and_keyboard_capture">Release captures</string>
<string name="notification_toggle_fullscreen">Toggle fullscreen</string>

<string name="pref_main">Preferences</string>
<string name="pref_output">Output</string>
Expand Down

0 comments on commit 4e7763b

Please sign in to comment.