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

Missing interface hotkeys at Linux Mint 20.3 with Cinnamon and python3. #102

Open
1 task
rafaelnotfound opened this issue Jul 28, 2023 · 2 comments
Open
1 task

Comments

@rafaelnotfound
Copy link

Checklist

  • [ X ] I use the latest release of atbswp
  • The issue is not existing yet

Verbose log

PASTE VERBOSE LOG HERE

Miscellaneous information

Operating System

Linux Mint 20.3 Una

Desktop Environment/Window Manager

Cinnamon

Python version

python3

Description

What is the key to start / stop recording? With the atbswp window focused with mouse click, i tried F9 key to start recording but after that, F9 key didn't stop the recording.

What is the key to "reset" the "Play capture counter" in the interface above the Play Capture button?

In linux, where is stored the last recorded events?

This settings could be in the docs of the program?

Hey, thanks for your time and work with atbswp.

@RMPR
Copy link
Owner

RMPR commented Jul 31, 2023

What is the key to start / stop recording? With the atbswp window focused with mouse click, i tried F9 key to start recording but after that, F9 key didn't stop the recording.

The default keys to start/stop the recording is F9, but in order for them to work, atbswp's windows needs to have focus

What is the key to "reset" the "Play capture counter" in the interface above the Play Capture button?

What do you mean by resetting? If the playback is interrupted, the counter is reset to the value set in the settings.

In linux, where is stored the last recorded events?

/tmp/atbswp-yyyy-mm-dd it's a python file

This settings could be in the docs of the program?

I'd gladly accept a PR!

@OstapTelychko
Copy link

In python exists such an awesome library like pynput it doesn't require focus on window to check pressed button.
Down below I will write simple example of autoclicker writen on this library. This autoclicker start clicking until user press f8 to stop it and then can start clicing again by pressing f8 again. No matter if user is focused on terminal or not clicker will stop and resume on button press. To implement this library in this project you have to rewrite
event creation method in file gui.py in class MainDialog and in function on_key_press you have to change logic from receiving keycode to just assigning pynput keyboard listener that will return you Key object

from pynput.mouse import Controller as MouseController, Button
from pynput.keyboard import Controller as KeyboardController, Key, Listener
from time import sleep

active = True
keyboard = KeyboardController()


def on_press(key):
    global active
    if key == Key.f8:
        active = not active
        
keyboard_listener = Listener(on_press=on_press)
keyboard_listener.start()

mouse = MouseController()
while True:
    while active:                                                                                                                                                                                                                                                                                                                  
        mouse.click(Button.left, 1)
        sleep(1)
    sleep(0.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants