summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Gorbunov2020-10-28 23:16:52 +0300
committerVladimir Gorbunov2020-10-28 23:16:52 +0300
commit68a6babdb6d8df9f7a164789955536dfe7e70fcd (patch)
treefaf1261b5c4eba81da70aaf22f1e78004868d8ef
parent5a23d84db33cf1c281f3610fb8b5a8728d6d3282 (diff)
downloadaur-68a6babdb6d8df9f7a164789955536dfe7e70fcd.tar.gz
Updated to 0.4.0
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD18
-rw-r--r--revert.patch114
3 files changed, 11 insertions, 132 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d52d9fffe639..8b04faaef99e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = xkeysnail
pkgdesc = Yet another keyboard remapping tool for X environment.
- pkgver = 0.3.0
- pkgrel = 4
+ pkgver = 0.4.0
+ pkgrel = 1
url = https://github.com/mooz/xkeysnail
arch = any
license = GPL
@@ -10,11 +10,10 @@ pkgbase = xkeysnail
depends = python-xlib
depends = python-evdev
depends = python-inotify-simple
+ depends = python-appdirs
options = !emptydirs
- source = https://files.pythonhosted.org/packages/source/x/xkeysnail/xkeysnail-0.3.0.tar.gz
- source = revert.patch
- sha256sums = 0eaff456508b06a1daad6408e2fe91828af988d591a165e6d863ef116bc60a3e
- sha256sums = 67fe4f70ffbb229dd1cf9db3f4040220760e0d7cabefde37da4466779069631c
+ source = https://files.pythonhosted.org/packages/source/x/xkeysnail/xkeysnail-0.4.0.tar.gz
+ sha256sums = eed97123cc3181f47d2d0371a140e6eb780a7ed40c1b24b1ea95b38ebdb9d8f7
pkgname = xkeysnail
diff --git a/PKGBUILD b/PKGBUILD
index 48803a5ca055..53ee24026743 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Vladimir Gorbunov <truedaemon@gmail.com>
pkgname=xkeysnail
-pkgver=0.3.0
-pkgrel=4
+pkgver=0.4.0
+pkgrel=1
pkgdesc="Yet another keyboard remapping tool for X environment."
arch=('any')
url="https://github.com/mooz/xkeysnail"
@@ -9,18 +9,12 @@ license=('GPL')
depends=('python'
'python-xlib'
'python-evdev'
- 'python-inotify-simple')
+ 'python-inotify-simple'
+ 'python-appdirs')
makedepends=('python-setuptools')
options=(!emptydirs)
-source=("https://files.pythonhosted.org/packages/source/x/${pkgname}/${pkgname}-${pkgver}.tar.gz"
- "revert.patch")
-sha256sums=('0eaff456508b06a1daad6408e2fe91828af988d591a165e6d863ef116bc60a3e'
- '67fe4f70ffbb229dd1cf9db3f4040220760e0d7cabefde37da4466779069631c')
-
-prepare() {
- cd "$srcdir/$pkgname-$pkgver"
- patch -Np1 -i "${srcdir}/revert.patch"
-}
+source=("https://files.pythonhosted.org/packages/source/x/${pkgname}/${pkgname}-${pkgver}.tar.gz")
+sha256sums=('eed97123cc3181f47d2d0371a140e6eb780a7ed40c1b24b1ea95b38ebdb9d8f7')
package() {
cd "$srcdir/$pkgname-$pkgver"
diff --git a/revert.patch b/revert.patch
deleted file mode 100644
index 0cd8bfbe87ee..000000000000
--- a/revert.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From 66ab9e6505df39783fe95142097a8516ed14c2cf Mon Sep 17 00:00:00 2001
-From: Len Trigg <lenbok@gmail.com>
-Date: Fri, 22 May 2020 10:36:33 +1200
-Subject: [PATCH] Revert "Merge pull request #71 from rbreaves/master"
-
-Fixes #74, #80, #81
-
-This reverts commit e3dceddf045a1bb98b8e4016e4fa7b001f14736f, reversing
-changes made to 123432bb038f35a8a26a6967fbf5c559edd48708.
----
- xkeysnail/output.py | 19 +++++--------------
- xkeysnail/transform.py | 20 +-------------------
- 2 files changed, 6 insertions(+), 33 deletions(-)
-
-diff --git a/xkeysnail/output.py b/xkeysnail/output.py
-index 4605ab3..d8f01f9 100644
---- a/xkeysnail/output.py
-+++ b/xkeysnail/output.py
-@@ -12,9 +12,6 @@ _uinput = UInput()
- _pressed_modifier_keys = set()
- _pressed_keys = set()
-
--def output_modifier_key():
-- return _pressed_modifier_keys
--
- def update_modifier_key_pressed(key, action):
- if key in Modifier.get_all_keys():
- if action.is_pressed():
-@@ -60,17 +57,8 @@ def send_combo(combo):
- missing_modifiers.remove(modifier)
-
- for modifier_key in extra_modifier_keys:
-- # Do not release new modifier
-- # until original modifier is released
-- # unless no modifier is the new mapping
-- if len(combo.modifiers) > 0:
-- for modifier in combo.modifiers:
-- if modifier_key != str(modifier.get_key()):
-- send_key_action(modifier_key, Action.RELEASE)
-- released_modifiers_keys.append(modifier_key)
-- else:
-- send_key_action(modifier_key, Action.RELEASE)
-- released_modifiers_keys.append(modifier_key)
-+ send_key_action(modifier_key, Action.RELEASE)
-+ released_modifiers_keys.append(modifier_key)
-
- pressed_modifier_keys = []
- for modifier in missing_modifiers:
-@@ -82,6 +70,9 @@ def send_combo(combo):
-
- send_key_action(combo.key, Action.RELEASE)
-
-+ for modifier in reversed(pressed_modifier_keys):
-+ send_key_action(modifier, 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..e1dfea2 100644
---- a/xkeysnail/transform.py
-+++ b/xkeysnail/transform.py
-@@ -4,7 +4,7 @@ import itertools
- from time import time
- from inspect import signature
- from .key import Action, Combo, Key, Modifier
--from .output import send_combo, send_key_action, send_key, is_pressed, output_modifier_key
-+from .output import send_combo, send_key_action, send_key, is_pressed
-
- __author__ = 'zh'
-
-@@ -12,7 +12,6 @@ __author__ = 'zh'
-
- import Xlib.display
-
--_release_combo = False
-
- def get_active_window_wm_class(display=Xlib.display.Display()):
- """Get active window's WM_CLASS"""
-@@ -418,31 +417,14 @@ def on_event(event, device_name, quiet):
-
-
- def on_key(key, action, wm_class=None, quiet=False):
-- global _release_combo
-- output_mods = output_modifier_key().copy()
- if key in Modifier.get_all_keys():
- update_pressed_modifier_keys(key, action)
- send_key_action(key, action)
-- # Release mapped modifier only when physical mod
-- # 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)
- elif not action.is_pressed():
- if is_pressed(key):
- send_key_action(key, action)
-- # Unset modifiers used in nested mode_maps
-- elif _release_combo and len(output_mods) > 0:
-- _release_combo = False
-- for output_key in output_mods:
-- update_pressed_modifier_keys(output_key, action)
-- send_key_action(output_key, action)
- else:
- transform_key(key, action, wm_class=wm_class, quiet=quiet)
-- # Will unset mode maps modifiers on next combo
-- if _mode_maps != None:
-- _release_combo = True
-
-
- def transform_key(key, action, wm_class=None, quiet=False):
---
-2.27.0
-