github RedBearAK/Toshy Toshy_v25.07.0
Toshy v25.07.0

latest release: Toshy_v25.08.0
7 months ago

Releases from this project are meant only as records of major changes. There will be automatic attachments generated by GitHub, but to get the latest version download the zip from the green <> Code ▼ button on the main page, or use the quick-install single command.

Changes

  • Make setting PATH for access to local-bin more robust
  • Adapt to some bugs on Deepin Desktop Environment and deepin-terminal
  • Add support for Mageia Linux (related to Mandrake, OpenMandriva)
  • Make sure to handle Tk 9 and updated theme module for GUI app
  • Log which sub-method logic branch is used in DNF distro handler
    • (DNF handler deals with Fedora, Mageia, OpenMandriva, and RHEL distro types)
  • Refine terminal output from Mac startup sound volume control script
  • Add asyncio based multi-tap support (see notes)

Notes on Multi-Tap Implementation

Replacing the rough "hack" in the config that just detected if something hit the function twice, which unfortunately blocked the normal single-tap usage of the same combo globally, there is now an experimental implementation of true multi-tap support, using asyncio to deal with the time delays and repeated input that happens (or doesn't happen before the delay times out) before emitting the final action "later". Default timing is 0.25s between tap levels.

If the same input combo is designated as the single-tap action, it is effectively non-blocking for the original combo, while also allowing double-tap or higher (up to a 5-tap action is allowed) uses of the same combo to instead perform some different combo or action. Anything beyond 5 taps of the same input will be ignored/blocked.

The rest of the config has no interaction with the multi-tap logic at all if no multi-tap combo is encountered, so no latency or performance difference should be seen for any other kind of remapped input. The diagnostic dialog will still appear for either Shift+Opt+Cmd+I,I or Shift+Opt+Cmd+H,H (double-taps of the final key in the combo, just like before).

Actions allowed in a multi-tap combo

  • Keys (only useful for emitting modifier key presses alone)
  • Combos (normal way to emit any key or Mod[s]+key shortcut)
  • String processor calls (the ST() alias)
  • Macros (lists of things like Keys, Combos, strings, sleeps, etc.)
  • Arbitrary function calls (e.g. diagnostic dialog, macro test functions)

Syntax for multi-tap combos inside keymaps:

Several examples for the multi-tap syntax are in the newer diagnostic shortcuts keymap at the end of the default config files.

Using None will block a tap level action. Designating the same combo as the single-tap action will make the multi-tap combo "transparent" as far as apps are concerned (i.e., it will work normally in addition to the multi-tap actions, in any app that will do something in response to that combo). Arbitrary functions and lambdas can be used as actions, such as the function that produces the diagnostic dialog.

Anything with a string output action should be tested in a text editor. Print commands in custom functions or lambdas will only appear in terminal logging (what you see when using the toshy-debug command).

keymap("Diagnostics (isMultiTap)", {

    C("Shift-Alt-RC-i"): isMultiTap(
                            # tap_1_action=None,  # Block single tap
                            tap_1_action=C("Shift-Alt-C-i"),    # Keep original single-tap combo
                            tap_2_action=notify_context,
                        ),

    C("Shift-Alt-RC-h"): isMultiTap(
                            tap_1_action=C("Shift-Alt-RC-h"),   # Keep original single-tap combo
                            tap_2_action=notify_context,
                            tap_3_action=lambda: print("\nTriple tap!\n"),  # Shows in terminal
                        ),

    C("Shift-Alt-RC-t"): isMultiTap(
                            tap_1_action=C("C-n"),          # Test single-tap by opening new window
                            tap_2_action=macro_tester,      # Types out a long test macro text
                            tap_3_action=[
                                ST("You tapped Shift-Alt-C-t 3 times!!!"),
                                C("Enter"), C("Enter")],
                            tap_4_action=[
                                ST("You tapped Shift-Alt-C-t 4 times!!!!"),
                                C("Enter"), C("Enter")],
                            tap_5_action=[
                                ST("You tapped Shift-Alt-C-t 5 times!!!!!"),
                                C("Enter"), C("Enter")],
                        ),

}, when = lambda ctx: ctx is ctx)
Auto-generated full release notes (click to expand):

What's Changed

Full Changelog: Toshy_v25.06.1...Toshy_v25.07.0

Don't miss a new Toshy release

NewReleases is sending notifications on new releases.