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

toggle active on hotkey down, deactivate on hotkey up #58

Open
ElijahLynn opened this issue Nov 19, 2018 · 9 comments
Open

toggle active on hotkey down, deactivate on hotkey up #58

ElijahLynn opened this issue Nov 19, 2018 · 9 comments

Comments

@ElijahLynn
Copy link

How can I activate only on keypress down?

@bk138
Copy link
Owner

bk138 commented Nov 19, 2018

Hi! You activate via the hotkey, as stated in the docs. Or am I misunderstanding you?

@bk138 bk138 added the question label Nov 19, 2018
@ElijahLynn
Copy link
Author

I mean only activate on keypress down, and then when it is released it is deactivated. Like a temporary toggle.

@bk138
Copy link
Owner

bk138 commented Nov 19, 2018

That's not possible with the current code but can be changed.

@ElijahLynn
Copy link
Author

Thanks for clarifying. Fyi, my underlying goal is to get back to what Compiz Annotate did, which was just activate on a keypress down. I think this would be a useful addition!

I am open to coding this or helping code it if this will take a lot of time.

@bk138
Copy link
Owner

bk138 commented Nov 19, 2018

Feel free to provide a PR :-)

@ElijahLynn
Copy link
Author

@bk138 thanks, if I am going to undertake this some simple guidance on what parts to look at would greatly speed this up as I am new to this type of development and am mostly a web developer (PHP, JavaScript, Ansible etc).

@bk138
Copy link
Owner

bk138 commented Nov 19, 2018

Here

gint snoop_key_press(GtkWidget *grab_widget,
the hotkeys are handled and as you can see, a key down event is handled to toggle stuff.

@ElijahLynn
Copy link
Author

Thanks, I'll plan on tackling this in the near future, and ask follow up questions here or open a WIP PR.

@bk138
Copy link
Owner

bk138 commented Jul 3, 2019

General update: issues with Gromit-MPX can now be funded at https://issuehunt.io/r/bk138/gromit-mpx

@bk138 bk138 changed the title Example needed: How to only activate on keypress down? toggle active on hotkey down, deactivate on hotkey up Dec 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants