Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to trigger on key release (on_release, is_pressed, is_down) #712

Open
2 tasks done
shawarden opened this issue Jul 10, 2022 · 20 comments
Open
2 tasks done

No way to trigger on key release (on_release, is_pressed, is_down) #712

shawarden opened this issue Jul 10, 2022 · 20 comments
Labels
autokey triggers Issues related to hotkeys, abbreviations, window filters, etc. enhancement

Comments

@shawarden
Copy link

shawarden commented Jul 10, 2022

Has this issue already been reported?

  • I have searched through the existing issues.

Is this a question rather than an issue?

  • This is not a question.

What type of issue is this?

Enhancement

Which Linux distribution did you use?

❯ lsb_release -a
LSB Version:	n/a
Distributor ID:	Garuda
Description:	Garuda Linux
Release:	Soaring
Codename:	Talon
❯ uname -a
Linux perseus 5.18.9-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Sat, 02 Jul 2022 21:03:08 +0000 x86_64 GNU/Linux

Which AutoKey GUI did you use?

Qt

Which AutoKey version did you use?

❯ autokey-qt --version
autokey-qt Version 0.96.0

How did you install AutoKey?

yay -S autokey-qt

Can you briefly describe the issue?

There is no way to rigger an event/script when releasing a key without running as root.

Using the script as a user:

import keyboard as keyboard2         # python's keyboard module
import time                          # sleep function

while True:                          # Loopy
    keyboard.send_keys("1")          # Do stuff
    if keyboard2.is_pressed('ctrl'): # There is no inherent key release trigger so is the key down at the moment this check runs?
        break                        # Kill the loop
    else:
        time.sleep(2)                # Not too fast there bucko.

gives

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/autokey/service.py", line 530, in _execute
    exec(compiled_code, scope)
  File "/home/samh/.config/autokey/data/My Stuff/stupid_test.py", line 6, in <module>
    if keyboard2.is_pressed('q'): # if key 'q' is pressed
  File "/usr/lib/python3.10/site-packages/keyboard/__init__.py", line 410, in is_pressed
    _listener.start_if_necessary()
  File "/usr/lib/python3.10/site-packages/keyboard/_generic.py", line 35, in start_if_necessary
    self.init()
  File "/usr/lib/python3.10/site-packages/keyboard/__init__.py", line 196, in init
    _os_keyboard.init()
  File "/usr/lib/python3.10/site-packages/keyboard/_nixkeyboard.py", line 113, in init
    build_device()
  File "/usr/lib/python3.10/site-packages/keyboard/_nixkeyboard.py", line 109, in build_device
    ensure_root()
  File "/usr/lib/python3.10/site-packages/keyboard/_nixcommon.py", line 174, in ensure_root
    raise ImportError('You must be root to use this library on linux.')
ImportError: You must be root to use this library on linux.

You can run autokey-qt as root but that's really not they way things are supposed to be done around here.

Can the issue be reproduced?

Yes

What are the steps to reproduce the issue?

Require both button press events and a button release events.
Write button press event.
Bash head against trying to detect whether a key is still down or not.

What should have happened?

There should be an optional tick-box on the capture page to say this is a release trigger, or Autokey's API should come with is_pressed function to check is key is still down without being root user. Ideally the former as checking if the key is still down can cause issues with releasing and re-pressing the key.

What actually happened?

Nothing. There doesn't seem to be a sane way to trigger an event on key release.

Do you have screenshots?

no

Can you provide the output of the AutoKey command?

❯ autokey-qt -l
...
2022-07-10 14:06:13,588 DEBUG - autokey.service - Raw key: <Key.NP_PAGE_DOWN: '<np_page_down>'>, modifiers: [], Key: 3
2022-07-10 14:06:13,588 DEBUG - autokey.service - Window visible title: '*untitled - Geany', Window class: 'geany.Geany'
2022-07-10 14:06:13,588 INFO - autokey.service - Matched Script "stupid_test" with hotkey and prompt=False
2022-07-10 14:06:13,589 DEBUG - autokey.service - Script runner executing: Script('stupid_test')
2022-07-10 14:06:13,589 DEBUG - autokey.service - Input queue at end of handle_keypress: deque(['3'], maxlen=150)
2022-07-10 14:06:13,615 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:06:13,616 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:06:13,622 ERROR - autokey.service - Script error
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/autokey/service.py", line 530, in _execute
    exec(compiled_code, scope)
  File "/home/USER/.config/autokey/data/My Stuff/stupid_test.py", line 6, in <module>
    if keyboard2.is_pressed('q'): # There is no inherent key release trigger so is the key down at the moment this check runs?
  File "/usr/lib/python3.10/site-packages/keyboard/__init__.py", line 410, in is_pressed
    _listener.start_if_necessary()
  File "/usr/lib/python3.10/site-packages/keyboard/_generic.py", line 35, in start_if_necessary
    self.init()
  File "/usr/lib/python3.10/site-packages/keyboard/__init__.py", line 196, in init
    _os_keyboard.init()
  File "/usr/lib/python3.10/site-packages/keyboard/_nixkeyboard.py", line 113, in init
    build_device()
  File "/usr/lib/python3.10/site-packages/keyboard/_nixkeyboard.py", line 109, in build_device
    ensure_root()
  File "/usr/lib/python3.10/site-packages/keyboard/_nixcommon.py", line 174, in ensure_root
    raise ImportError('You must be root to use this library on linux.')
ImportError: You must be root to use this library on linux.
2022-07-10 14:06:14,584 DEBUG - autokey.interface - X Mapping Event Detected
...
2022-07-10 14:06:31,657 DEBUG - autokey.qtapp - All shutdown tasks complete... quitting
❯ sudo autokey-qt -l
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
2022-07-10 14:07:56,269 INFO - autokey.qtapp - Initialising application
2022-07-10 14:07:56,305 INFO - autokey.qtapp - Initialise global hotkeys
...
2022-07-10 14:08:16,260 DEBUG - autokey.service - Raw key: <Key.NP_PAGE_DOWN: '<np_page_down>'>, modifiers: [], Key: 3
2022-07-10 14:08:16,260 DEBUG - autokey.service - Window visible title: '*untitled - Geany', Window class: 'geany.Geany'
2022-07-10 14:08:16,262 INFO - autokey.service - Matched Script "junk1" with hotkey and prompt=False
2022-07-10 14:08:16,266 DEBUG - autokey.service - Script runner executing: Script('junk1')
2022-07-10 14:08:16,266 DEBUG - autokey.service - Input queue at end of handle_keypress: deque(['3'], maxlen=150)
2022-07-10 14:08:16,266 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:16,271 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:16,278 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:16,280 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:16,784 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:16,786 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:17,858 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:17,860 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:18,079 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:18,081 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:18,272 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:18,274 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:18,280 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:18,282 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:18,786 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:18,788 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:19,861 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:19,863 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:20,082 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:20,084 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:20,275 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:20,277 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:20,282 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:20,284 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:20,788 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:20,791 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:21,863 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:21,866 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:22,084 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:22,086 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:22,277 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:22,279 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:22,284 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:22,286 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:22,791 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:22,793 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:22,808 DEBUG - autokey.iomediator.iomediator - Key.CONTROL pressed
2022-07-10 14:08:23,865 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:23,867 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:24,086 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:24,088 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:24,280 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:24,282 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:24,286 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:24,288 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:24,794 DEBUG - autokey.iomediator.iomediator - Send via event interface
2022-07-10 14:08:24,796 DEBUG - autokey.interface - Sending string: '1'
2022-07-10 14:08:27,775 DEBUG - autokey.iomediator.iomediator - Key.CONTROL released
2022-07-10 14:08:28,179 DEBUG - autokey.service - Raw key: <Key.ENTER: '<enter>'>, modifiers: [], Key: Key.ENTER
2022-07-10 14:08:28,180 DEBUG - autokey.service - Window visible title: '*untitled - Geany', Window class: 'geany.Geany'
2022-07-10 14:08:28,181 DEBUG - autokey.service - Input queue at end of handle_keypress: deque(['3', '\n'], maxlen=150)
...
2022-07-10 14:08:37,983 DEBUG - autokey.qtapp - All shutdown tasks complete... quitting

Anything else?

I honestly have searched but between autohotkey results sneaking in and pressed, release, down and up being super common words, you get pages of ambiguous and unrelated junk.

The debug output can see CONTROL, SHIFT and ALT key press and release events but doesn't do anything when other keys are released, only when pressed.

@josephj11 josephj11 added enhancement autokey triggers Issues related to hotkeys, abbreviations, window filters, etc. labels Jul 10, 2022
@josephj11
Copy link
Contributor

While this is a valid enhancement request, there are some workarounds that may get you part way there.

But first, don't run AutoKey as root! I'm not sure exactly what will happen, but at a minimum, a number of files would end up getting owned by root and that would make it unusable without root access later.

Again, not sure of the details, but it's likely that your scripts would run as root, potentially allowing anyone with user access to your user scripts to insert arbitrary Python code that could be a gaping security hole. And that includes you if you make a simple mistake in your script coding.


Check out this Reddit thread for some ideas of what is possible now.

You still have to launch your script "normally", but once you do, you should be able to detect and act on key status changes.

Also, as a general rule of thumb, it's not a good idea to write AutoKey scripts that run for a "long" time. AutoKey is multithreaded so it's possible to do, but we don't have a lot experience with those conditions and you may encounter bugs.

If you would like some assistance getting this to work, come post on Gitter. And when you do succeed, we are always looking for good example code to add to our wiki.

AutoKey treats a number of keys such as Shift, Ctrl, and Alt as modifier keys. It detects them, but doesn't do anything with them directly other than using them to define and detect multi-keypress hotkeys.

@shawarden
Copy link
Author

shawarden commented Jul 11, 2022

Root

The main point was indeed to not run things as root even if doing so just runs it from /root/.config/autokey/. It's not messing with my user's folders etc and editing root's scrips requires root access. It just rubs entirely the wrong way.

Duration

Having a script thread sit there waiting for the key release, aka running for a "long" time, is also not ideal, though not the worst case scenario as they usually only last for a few seconds.

Separation

As mentioned, the preferred option would be to have a specific, separate script that triggers on key release. Using the store for any data that needs to make it through.

There could be a tick-box or "modifier" button on the Set Hotkey dialogue box that flags it as a hotkey release trigger. But then you have to make sure your on_release hot-keys match. Easy enough if you're paying attention but kinda pointless as if ctrl AND d is inherently not valid when either ctrl OR d are released, for example.

Ideally, there would be an entirely secondary script that contained the on_release code and was automatically tied to the current context.

This could be either as tabs, collapsible pane or a Sub-script menu option.

The tabbed editor layout would be fairly intuitive, just having 2 tabs above the script edit window. One for on_press and one for on_release.

The collapsible pane would be below the main editing pane.

Sub-script menu entry would appear when right-clicking on an existing script. When a script is selected, New > Release-script. There would be no Script settings area for that as it would inherit the parent script's and it would trigger within the context if the "Hotkey:" or "Window Filter:" are no longer valid.

Personally I lean towards the tab or collapsible pane option.

Workarounds

I have been poking at it a bit and have run into pynput which does not require root to run and doesn't require me to pull specific input devices as the evdev method that I had not found before.

Courtesy of Nitratine, I have...

this script
#!/usr/bin/env python3

from pynput.mouse import Listener as MouseListener
from pynput.keyboard import Listener as KeyboardListener
import logging, sys, subprocess

logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s',
					level=logging.DEBUG,
					stream=sys.stdout)

def get_active_window():
	cmd = "xprop -id $(xdotool getactivewindow)"
	ps = subprocess.Popen(
		cmd,
		shell=True,
		stdout=subprocess.PIPE,
		stderr=subprocess.STDOUT)
	output = ps.communicate()[0].decode("utf-8").split('\n')
	winClass = "NULL"
	for line in output:
		if "WM_CLASS(STRING)" in line:
			winClass = line.split('=')[-1].split(',')[-1].lstrip().strip('"')
			break
	return winClass

def on_press(key):
	logging.info("Key {0} pressed on {1}".format(key, get_active_window()))

def on_release(key):
	logging.info("Key {0} released on {1}".format(key, get_active_window()))

def on_click(x, y, button, pressed):
	if pressed:
		logging.info('Mouse {0} clicked at ({1}, {2}) on {3}'.format(button, x, y, get_active_window()))
	else:
		logging.info('Mouse {0} released at ({1}, {2}) on {3}'.format(button, x, y, get_active_window()))

def on_scroll(x, y, dx, dy):
	logging.info('Mouse scrolled at ({0}, {1})({2}, {3}) on {4}'.format(x, y, dx, dy, get_active_window()))

# Setup the listener threads
keyboard_listener = KeyboardListener(on_press=on_press, on_release=on_release)
mouse_listener = MouseListener(on_click=on_click, on_scroll=on_scroll)

# Start the threads and join them so the script doesn't end early
keyboard_listener.start()
mouse_listener.start()
keyboard_listener.join()
mouse_listener.join()

... that does the detection (including mouse!) and it should integrate with with AutoKey for purely keyboard stuff without too much fuss. Bonus that I can use AutoKey's window detection for some of it.

This is still of the "long" running script variety though, which is not ideal.

@Elliria
Copy link
Contributor

Elliria commented Jul 11, 2022

Is there any chance that issue #659 could be related to this one?

@josephj11
Copy link
Contributor

@Elliria I thought about that, but I think it's somewhat tangential. The OP wants things to happen when a key is already pressed or detected being released. If the key is already pressed, I don't think there will be an event to wait for. It happened before this script started. It would enable detection of a subsequent keypress, but that seems secondary to the OP.

@josephj11
Copy link
Contributor

@shawarden That Python code is beyond my minimal understanding of Python. When you get things working, please tell us how you did it!

@josephj11
Copy link
Contributor

Just for reference (I had to look it up): Garuda is a flavor of Arch. That's why the OP already has 0.96.0.

@shawarden
Copy link
Author

shawarden commented Jul 11, 2022

@josephj11 I have managed to get it working but the solution is nasty. It doesn't require root though so I'll count it as a win.

For this example...

...the application doesn't recognize the number pad's 1 or end key at all, regardless of numlock state and the main keyboard's 1 key's function varies depending on how long you hold it. A tap performs one function while a hold does another. A repeated tap does the tap function over and over, instead of triggering the hold function.

Unfortunately AutoKey's build in keyboard.press_key(key) and keyboard.release_key(key) do not work reliably in all applications so the behavior is not intuitive. Left to it's own devices, AutoKey will also tap away until they hotkey is released.

I have incorporated pynput's press(key) and release(key) functions as they work reliably in the application in question, and all other use cases I've tested.

I have used AutoKey's store API to effectively block AutoKey's tap spam.

To reliably detect the key release, I've tried to use pynput's listener, to keep everything in Python but I haven't figured it out yet. A brute force approach with xinput however did the job nicely. So I call an external shell script that just waits for the key in question to be released... As I said, it's a nasty workaround. The evdev method may end up being cleaner to be honest...

The AutoKey script bound to NP_End: np1-to-main1.py:

import os
from pynput.keyboard import Controller

keyboard_actual = Controller()

# Store exists? 
if not store.has_key("pressed"):
    store.set_value("pressed",0)

# Are we pressing?
if store.get_value("pressed") == 0:
    # No, lets press.
    store.set_value("pressed",1)
    keyboard_actual.press('1')
    # Wait for release... numpad1, KP_End is key 87 on my system. 
    os.system('~/.config/autokey/keyrelease.sh 87')
    # Release.
    store.set_value("pressed",0)
    keyboard_actual.release('1')

~/.config/autokey/keyrelease.sh:

#!/bin/bash

# target key.
keyNum=$1

# Loop until target key is not down.
#     Cycle through all keyboard ids.
while for id in $(
		xinput list | \
		grep -v "pointer\|master" | \
		grep keyboard | \
		awk -F'id=' '{print $2}' | \
		awk '{print $1}'
		)
	do
                # dump key states for all keyboards.
		xinput query-state $id
	done | grep down | grep ${keyNum} &>/dev/null
do
		continue
done

Now to copy & past the script for numpad 2 through 0...

@josephj11
Copy link
Contributor

Interesting pieces of code. Glad it works. I would have to really study it to see what it's doing.
Do you have multiple keyboards?

@shawarden
Copy link
Author

No but xinput thinks I have 8 and I was after a solution that didn't care what device you were using.

@josephj11
Copy link
Contributor

I went through something like that using xdotool in bash. Each browser window (possibly including a few that are never visible) counts as a separate instance. When a window isn't visible, xdotool returns -1 for the window number and you know it is one you don't need to deal with directly. Everything, tabs and even dialog boxes count as separate windows at this level.

I have a bash startup script that restores my desktops the way I want them that uses xdotool to find application windows and move them to where I want them to be on my virtual desktops.

@Elliria
Copy link
Contributor

Elliria commented Jul 12, 2022

It's actually quite beautiful. I'm curious why you're using an external script rather than a shared AutoKey script for releasing the key, though. I'm guessing it's because you're already out roaming around in the OS, so you may as well stay there.

@Elliria
Copy link
Contributor

Elliria commented Jul 12, 2022

I've come across something sort of like that somewhat recently while doing one of a billion configurations in Kubuntu, @josephj11. I think it's a Qt thing to refer to everything as a window. When I saw it, it was something really odd like you mentioned - a button or something. Not anything one would normally consider a window.

@shawarden
Copy link
Author

@Elliria I am trying to get something purely in AutoKey but so haven't managed to yet as AutoKey lacks the native ability to wait for a key to be released. pynput seems to offer some hope, so I'll keep poking away at it.

I was originally trying to do all of this with xbindkeys which has native release + KEY and xdotool which has key[down|up] but for whatever reason, just like vanilla AutoKey, it doesn't trigger correctly in all applications. I might try it again with the keyrelease.sh keynum script but it will depend on whether xbindkeys can handle multiple active hotkeys at the same time.

@josephj11
Copy link
Contributor

@shawarden Some applications that use some sort of pure X interface ignore synthetic keypresses (which is what AutoKey uses). Their names usually start with an x, like xterm and xsane. Xdotool sends keypresses differently and sometimes overcomes this problem and sometimes, our fake_keypress API works. I don't understand the internals of any of it.

@shawarden
Copy link
Author

shawarden commented Jul 14, 2022

It's incredibly frustrating.

xdotool works perfectly for my use case, but only if I do it directly on the command line.

If I running sleep 5; xdotool keydown 2; sleep 1; xdotool keyup 2 on the command line and switch to the application it works exactly as holding 2 for 1 second should work.

If I block the spam (by checking for a hash file touch /dev/shm/$(echo ${USER}${0}${button} | md5sum | awk '{print $1}')) it doesn't work unless I tap quickly. It's like the xdotool keydown 2 doesn't reach the application until xdotool keyup 2 does.

My current solution, using the pynput and xinput scan script works fairly well but it turns out that the application is actually losing focus. Something I only noticed because kwin lets me set unfocused windows to a reduced opacity.

I don't miss Windows at all but I do miss AutoHotkey's per application hotkeys more every day and AutoKey just doesn't compare, despite using Python instead of a custom language.

@josephj11
Copy link
Contributor

@shawarden If you get desperate. I'm told that a thing called Proton that works like Wine will run AHK on Linux. I usually don't mention such heretical things here, but you've obviously put in the work. As you can tell by my precision above :) I have no idea how any of that works.

@shawarden
Copy link
Author

@josephj11 I have tried. Unfortunately Wine and Proton only let AutoHotkey see applications running in the same Wine prefix.

@Elliria
Copy link
Contributor

Elliria commented Jul 15, 2022

I'm kind of surprised to see myself saying this in quite this way, but fortunately, this is a bug. The fact that AutoKey can't work with key releases is not intentional, so this should be fixed at some point. Unfortunately, those of us who have responded to this issue report so far don't have what it takes to fix it. Fortunately, there are others who also check these issue reports who just might be able to do something about it.

@josephj11
Copy link
Contributor

@Elliria IMHO A bug is something that works wrong. It says a developer did something wrong or that something that used to be right no longer is and needs to be fixed for program to resume working correctly within its current scope.

An oversight/omission/shortcoming is usually not a bug. So, I see this as an enhancement. I would be happy if someone implements it.

By your definition, if you left out an example case on your Kdialog pages, that's a bug - even if every other presented example is perfectly correct. This almost makes all enhancement requests into bugs to be fixed.

I interacted with Chris Deckter for at least a year or two before he left the project, but I have no idea what his intentions were about most things. Mainly, he went as far as he could which gave us a great project. Then, he had to support it, largely by himself, so he had limited time/energy for further enhancements.

OTOH, my Duplex project (through no fault of its own) no longer works correctly with my laser printers because someone in CUPS land got clever and changed the way CUPS works with odd page count print jobs (It didn't used to do anything.). Their "enhancement" works totally backwards on my printers and makes my software fail spectacularly. Since I have absolutely no influence on anything they do in CUPS, this failure is my bug to correct. My software fails, so it's a bug - even though I didn't cause it.

@Elliria
Copy link
Contributor

Elliria commented Jul 15, 2022

Sorry about that, @josephj11. I wasn't suggesting that it needed to be recategorized or that it was something other than what it is. I just meant that it's good that it's in the issue tracker, because that's where it seems like it belongs so that someone who can do something about it will be likely to find it. You're right that it would be an enhancement. We have wait_for_keypress in the API, but don't have wait_for_keyrelease yet, and that's what this issue is about, so it's a good wish.

And I feel your pain with software changes causing all kinds of problems. I'm suffering with a touch of that at the moment, too, with my recent upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autokey triggers Issues related to hotkeys, abbreviations, window filters, etc. enhancement
Projects
None yet
Development

No branches or pull requests

3 participants