From 68395fd91c93b2d1f098daf599a03789c544bd85 Mon Sep 17 00:00:00 2001 From: Manolis Stamatogiannakis Date: Sat, 6 Mar 2021 19:33:40 +0100 Subject: [PATCH] temporary fix for using kinto with Synergy If you use kinto and [Synergy](https://symless.com/synergy) at the same time, kinto will apply transformations when Synergy has the focus. This messes up input because the transformed keypresses are consumed by a different desktop. However it is not possible to write a rule to avoid transforming keypresses specifically for Synergy, because Synergy doesn't seem to set the wm_class. The conditional modmap in this commit solves the problem. But it will also affect any other applications not setting the wm_class. For this, the modmap is commented by default, and Synergy users (which shouldn't be too many) need to enable it manually. --- linux/kinto.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/linux/kinto.py b/linux/kinto.py index 131b974..0f4c9c0 100755 --- a/linux/kinto.py +++ b/linux/kinto.py @@ -44,6 +44,12 @@ define_multipurpose_modmap( { # Placeholder }) +# Fix for avoiding modmapping when using Synergy keyboard/mouse sharing. +# Synergy doesn't set a wm_class, so this may cause issues with other +# applications that also don't set the wm_class. +# Enable only if you use Synergy. +# define_conditional_modmap(lambda wm_class: wm_class == '', {}) + # [Global modemap] Change modifier keys as in xmodmap define_conditional_modmap(lambda wm_class: wm_class.casefold() not in terminals,{