-
-
Notifications
You must be signed in to change notification settings - Fork 18
General improvements over Kinto
Toshy was created after modifying Kinto way too much to integrate the changes back into Kinto easily. Here's a list of things Toshy does differently (maybe better, maybe not) than the Kinto project that it split away from.
-
Multi-environment support: Moving between different desktop environments and session types (X11/Xorg or Wayland) on the same machine is MUCH easier, due to the use of an "environment" module that feeds information to the config file about what type of environment it is starting up in. This allows some dynamic remaps specific to each type of Linux desktop environment, and without re-running the installer process (at least that is the goal). It also prompts the keymapper to use the correct method to get the window context information for the environment. The keymapper will also prompt the user in verbose logging output if the environment is NOT compatible yet. So if you are like me and enjoy spending time experimenting with different session types and different desktop environments on the same Linux system, Toshy will work much better for that, and will improve over time.
-
Multi-user support: I believe some changes I've made will facilitate proper multi-user support on the same system. Even in the case of the user invoking a "Switch User" feature in their desktop environment, where the first user's desktop is still running in the background while another user is logged into their own desktop and using the screen (and physical keyboard). This is a very convenient feature even if you aren't actually sharing your computer with another person. There are many reasons why you might want to log into a different user's desktop to test something. Currently this absolutely requires
systemd
andloginctl
. -
Python virtual environment. Many distros are taking the advice of Python maintainers and moving to a "managed" Python environment that tries to prevent users from breaking system services that rely on the system-level Python library. Many users are annoyed by this and just use the
--break-system-packages
option withpip
to install Python packages like they've been doing for a long time, but the proper solution to these managed environments is to set up your own Python virtual environment where you can install any Python packages you want without risking damage to the system Python libraries. Toshy sets up avenv
during install, so it has no issue installing on distros with managed Python environments. -
No modifying
sudoers
: Certain Linux distros, outside the most popular group of Ubuntu-based, Debian-based, Arch-based and Red Hat/Fedora-related distros, really did not like the way the Kinto installer messes with thesudoers
file. The Kinto installer does this to provide the user easier access to certain commands used to control thexkeysnail
service. Some of these Linux distros would get b0rked quite badly if you ran the Kinto installer on them. A couple I ran into that had this problem were antiX and Gentoo. Strangely, the close relative of antiX, the very popular MX Linux, did not have the same problem with Kinto that antiX had. The Toshy installer does nothing withsudoers
and uses "user"systemd
services, or a manual script, and sets upudev
rules so that the user doesn't need to run anything withsudo
to make the keymapping work. I've already tested Toshy successfully on antiX. Still looking for a user-friendly Gentoo ISO to use for testing, but I have no reason to believe it won't work just as well, once I figure out the native packages needed. -
A start on Wayland support. Wayland support is probably always going to be limited, since each different compositor needs a different method to access the focused app window info (class and title/name). To see what is currently working, go to this section of the README.
-
The Option-key special characters, as described in the README (or I might move that to a Wiki entry too). Two different layouts are available. Or it can be completely disabled.
-
Automatic categorizing of the keyboard type of the current keyboard device. No more switching of keyboard types from the tray icon menu, or re-running the installer, or being asked to press a certain key on the keyboard during install. Some keyboard devices will need to be added to a Python list in the config to be recognized as the correct type. This will evolve over time from user feedback.
-
Changing of some settings on-the-fly, without restarting the keymapper process. The tray icon menu and GUI preferences app will allow quickly enabling or disabling certain features, or changing/disabling the special characters layout. The change takes effect right away. (Adding or changing shortcuts in the config file will still require restarting the keymapper, which I've tried to make as easy as possible.)
-
Modmaps with
xwaykeyz
(forked fromkeyszer
, which was forked fromxkeysnail
) are concurrent/cascading rather than mutually exclusive. This enables some of the interesting fixes described in the following items. -
Fix for "media" functions on arrow keys. Some laptop keyboards don't have the usual PgUp/PgDn/Home/End navigation functions on the arrow keys, when you hold the
Fn
key. Instead, they have PlayPause/Stop/Back/Forward, media functions. If you are used to using an Apple portable, this is weird. Amodmap
in the Toshy config will optionally fix this, making the arrow keys work more like a standard MacBook keyboard. This feature can be enabled from the tray icon or GUI preferences app. It's not enabled by default. -
GTK 3 NumPad Fix: This one is starting to become less relevant, with most common GTK apps already moving to GTK 4. But apps that use GTK 3 had a really annoying bug where they wouldn't recognize the "navigation" functions on the keypad keys (what the keypad keys do when NumLock is off) if you tried to use them with a modifier key (i.e., as part of a shortcut). Those key combos would just get ignored. So if you didn't have the equivalent "real" navigation keys anywhere on your keyboard, there was no way to use shortcuts involving things like PgUp/PgDn/Home/End (on the numeric keypad). A
modmap
in the Toshy config will automatically fix this, if NumLock is off and the "Forced Numpad" feature (below) is disabled. -
"Forced Numpad" feature: On PCs, if the keyboard has a numeric keypad, NumLock is typically off, so the keypad doesn't automatically act as a Numpad, instead providing navigation functions until you turn NumLock on. But if you've used macOS for any length of time, you might have noticed that the numeric keypad is always a numeric keypad, and the "Clear" key sends
Escape
to clear calculator apps. You have to useFn+Clear
to disable NumLock and get to the navigation functions. Amodmap
in the Toshy config is enabled by default and makes the numeric keypad always a numeric keypad, and turns the NumLock key into a "Clear" key. This can be disabled in the tray icon menu or GUI preferences app, or temporarily disabled withFn+Clear
(on Apple keyboards) or the equivalent ofOption+NumLock
on PC keyboards (usually this is physicalWin+NumLock
). -
ASCII art section headers: Sections of the config file are labeled with ASCII art designed to be readable on a "minimap" or "overview" sidebar view found in many text editors and code editors, to make finding certain parts of the config file a little easier. There's also a "tag" on each section that can be located easily with a
Find
search in any text editor. -
Enter key to Rename: A custom function makes the
Enter
key behave pretty much like it does in the Finder, in most Linux file managers. Mainly what this enables is using theEnter
key to quickly rename files/folders, while still leaving it usable in text fields likeFind
and the location bar. Not perfect, but works OK in most cases. [NOTE: If you've never actually used the keyboard to "open" or "run" files/applications from the Finder, you may not realize that the keyboard shortcut for this is just the same keyboard shortcut for opening (or, "drilling down") into folders. It'sCmd+Down
arrow. TheEnter
key has never "opened" things in the Finder in the history of macOS, as far as I know, unlike the way theEnter
key has always been used in Windows and Linux file managers.] -
Cmd+W Fixes: The config contains an evolving fix for the problem of
Cmd+W
unexpectedly failing to close a lot of Linux "child" windows and "dialog" windows (that have no binding toCtrl+W
and want eitherEscape
orAlt+F4/Ctrl+Q
to close). This can lead to a bad unconscious habit of hittingCmd+W
followed immediately byCmd+Q
(which becomes a problem when you're actually using macOS). The list of windows targeted by this pair of keymaps will grow over time, with input from users encountering the issue ofCmd+W
unexpectedly failing to close a window. -
File Save/Open Dialogs: A partial fix for shortcut behavior in file save/open dialogs in apps like Firefox, now that WM_NAME (window name/title) is available. This is an addition to the "Finder Mods" that I contributed to Kinto, which are intended to mimic Finder keyboard behavior in most common Linux file manager apps.
-
Tab Nav Fixes: A collection of tab navigation fixes for various apps with a tabbed UI that don't use the mostly standard Ctrl+PgUp/PgDn shortcuts. The goal is to allow
Shift+Cmd+Braces
(the left/right square bracket keys) to perform tab navigation in as many Linux applications (with tabbed UIs) as possible, as it does in most Mac applications with a tabbed UI (Finder, web browsers, and so on). Let me know if you use a Linux app whereShift+Cmd+Braces
shortcuts are not working for tab navigation while Toshy is enabled. Usexprop WM_CLASS _NET_WM_NAME
to obtain the window attributes for matching (if you use X11/Xorg). -
Another growing collection of enhancements to various Linux apps to enable shortcuts like
Cmd+comma
(preferences) andCmd+I
(get info/properties) to work in more apps. -
A custom function (
matchProps
) in the config enables very powerful and complex (or simple) matching on multiple properties at the same time. Application class, window name/title, device name, NumLock and CapsLock LED state can all be combined in any way, and lists can be made of specific combinations of one or more of those properties to match on. This custom function was also crucial in enabling the next item, a fix for using Toshy with Synergy. -
Synergy Fix: Support for watching the Synergy log file to automatically disable remapping of keys when the focus is on the screen showing the remote system. Synergy still has the unfortunate problem that it presents no app class or window title, so there was previously no simple way to stop remapping keys in the same way that is done for other remote desktop types of apps. Synergy logs when the cursor and keyboard focus leaves and returns, so watching the log file seems to be a workable solution.
-
I'll add more if I come up with anything...