diff options
author | Vladimir Gorbunov | 2020-05-05 20:59:48 +0300 |
---|---|---|
committer | Vladimir Gorbunov | 2020-05-05 20:59:48 +0300 |
commit | b82729bbcf0d1a7012808a9232034843f2d4cc88 (patch) | |
tree | c2b9fccf7aac1a6484e420da78687c1fcc3cb19e | |
parent | a4b572c0400e00a4fb01a924170a962e30e8833b (diff) | |
download | aur-b82729bbcf0d1a7012808a9232034843f2d4cc88.tar.gz |
Added patch https://github.com/mooz/xkeysnail/pull/76
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r-- | modifiers.patch | 53 |
3 files changed, 66 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = xkeysnail pkgdesc = Yet another keyboard remapping tool for X environment. pkgver = 0.3.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/mooz/xkeysnail arch = any license = GPL @@ -12,7 +12,9 @@ pkgbase = xkeysnail depends = python-inotify-simple options = !emptydirs source = https://files.pythonhosted.org/packages/source/x/xkeysnail/xkeysnail-0.3.0.tar.gz + source = modifiers.patch sha256sums = 0eaff456508b06a1daad6408e2fe91828af988d591a165e6d863ef116bc60a3e + sha256sums = f4a39b066f452013283c5779edd862ed6b887c3542acd21b6b2820b32b63aeff pkgname = xkeysnail @@ -1,7 +1,7 @@ # Maintainer: Vladimir Gorbunov <truedaemon@gmail.com> pkgname=xkeysnail pkgver=0.3.0 -pkgrel=1 +pkgrel=2 pkgdesc="Yet another keyboard remapping tool for X environment." arch=('any') url="https://github.com/mooz/xkeysnail" @@ -12,8 +12,15 @@ depends=('python' 'python-inotify-simple') makedepends=('python-setuptools') options=(!emptydirs) -source=("https://files.pythonhosted.org/packages/source/x/${pkgname}/${pkgname}-${pkgver}.tar.gz") -sha256sums=('0eaff456508b06a1daad6408e2fe91828af988d591a165e6d863ef116bc60a3e') +source=("https://files.pythonhosted.org/packages/source/x/${pkgname}/${pkgname}-${pkgver}.tar.gz" + "modifiers.patch") +sha256sums=('0eaff456508b06a1daad6408e2fe91828af988d591a165e6d863ef116bc60a3e' + 'f4a39b066f452013283c5779edd862ed6b887c3542acd21b6b2820b32b63aeff') + +prepare() { + cd "$srcdir/$pkgname-$pkgver" + patch -Np1 -i "${srcdir}/modifiers.patch" +} package() { cd "$srcdir/$pkgname-$pkgver" diff --git a/modifiers.patch b/modifiers.patch new file mode 100644 index 000000000000..c70f9b85bf09 --- /dev/null +++ b/modifiers.patch @@ -0,0 +1,53 @@ +From bc580120f9e8e8cfea0b68d9a3cf2af670a7f2f2 Mon Sep 17 00:00:00 2001 +From: Ben Reaves <rbreaves@gmail.com> +Date: Fri, 1 May 2020 16:33:53 -0500 +Subject: [PATCH] - Persistent modifiers on partial release of modifier combo. + Fixes #74 + +--- + xkeysnail/output.py | 6 +++++- + xkeysnail/transform.py | 6 ++++-- + 2 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/xkeysnail/output.py b/xkeysnail/output.py +index 4605ab3..a7f2a95 100644 +--- a/xkeysnail/output.py ++++ b/xkeysnail/output.py +@@ -76,12 +76,16 @@ def send_combo(combo): + for modifier in missing_modifiers: + modifier_key = modifier.get_key() + send_key_action(modifier_key, Action.PRESS) +- pressed_modifier_keys.append(modifier_key) + + send_key_action(combo.key, Action.PRESS) + + send_key_action(combo.key, Action.RELEASE) + ++ # Release modifiers that are not physically held - ONLY ++ for modifier in missing_modifiers: ++ modifier_key = modifier.get_key() ++ send_key_action(modifier_key, Action.RELEASE) ++ + for modifier in reversed(released_modifiers_keys): + send_key_action(modifier, Action.PRESS) + +diff --git a/xkeysnail/transform.py b/xkeysnail/transform.py +index 76ca6f2..e3ad6fd 100644 +--- a/xkeysnail/transform.py ++++ b/xkeysnail/transform.py +@@ -427,8 +427,10 @@ def on_key(key, action, wm_class=None, quiet=False): + # is released + if str(key) != "Key.LEFT_SHIFT" and str(key) != "Key.RIGHT_SHIFT": + for output_key in output_mods: +- update_pressed_modifier_keys(output_key, action) +- send_key_action(output_key, action) ++ # Release modifiers that are not physically held - ONLY ++ if not is_pressed(output_key): ++ update_pressed_modifier_keys(output_key, action) ++ send_key_action(output_key, action) + elif not action.is_pressed(): + if is_pressed(key): + send_key_action(key, action) +-- +2.26.2 + |