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

[enhancement] Keyboard shortcut for eraser, brush size, pen, colors, etc #131

Open
omsfah opened this issue Sep 8, 2022 · 10 comments
Open

Comments

@omsfah
Copy link

omsfah commented Sep 8, 2022

I cant seem to find any keystrokes to change between tools, as I'm using a drawing tablet i would love to be able to change settings with keyboard input. Also, if doable, i know many drawing tablets have a built in eraser function, if possible to map these so notekit automatically changes would be great.

@blackhole89
Copy link
Owner

I cant seem to find any keystrokes to change between tools, as I'm using a drawing tablet i would love to be able to change settings with keyboard input.

My reasoning on this so far was that since you basically use pointer interaction for all tools apart from text entry, there is no problem in only making tools switchable by pointer click (since the most natural interaction while using a pen or mouse is to click something, not go back to your keyboard and press a key). Is this wrong? What sort of interaction are you specifically envisioning?

Also, if doable, i know many drawing tablets have a built in eraser function, if possible to map these so notekit automatically changes would be great.

I've seen two ways of implementing tablet erasers. One of them has the pen register as a different device while it's erasing; in that case, Notekit should at least remember that it's an eraser after you've set it to eraser once, as the current tool setting is maintained on a per-device basis. The other one is sending the eraser status as a mouse button or modifier key. (Probably common when erasing is implemented by a physical button on the pen or similar.) In that situation, we currently don't have any special handling, and I think it would be good to add something, but we need to understand if there is some form of standard (what button/key code is associated with erasing) or if we need to add a config setting to accommodate different setups.

@sp1ritCS
Copy link
Contributor

sp1ritCS commented Sep 8, 2022

The other one is sending the eraser status as a mouse button or modifier key. (Probably common when erasing is implemented by a physical button on the pen or similar.) In that situation, we currently don't have any special handling, and I think it would be good to add something, but we need to understand if there is some form of standard (what button/key code is associated with erasing) or if we need to add a config setting to accommodate different setups.

GDK3 already has Gdk.DeviceToolType that you can get from gdk_device_tool_get_tool_type() (with the device tool from gdk_event_get_device_tool()). It should handle almost any wacom digitizer just fine (no idea about other brands).

I sent you a patch that uses it to set the proper tool type for each tool initially. Got probably lost in the depths of the chatroom 🥴

@omsfah
Copy link
Author

omsfah commented Sep 8, 2022

I was not aware of notekits capabilities to separate devices, I haven't thought of the option to manually choose eraser first. But that works excellent! I would still enjoy keyboard shortcuts if possible, too quickly change between colors/ brush dimmensions while taking notes (For context, my drawing board has buttons that can emulate keyboard input)

@sp1ritCS
Copy link
Contributor

sp1ritCS commented Sep 8, 2022

For context, my drawing board has buttons that can emulate keyboard input

Out of personal interest, what software to you use to map these? My digitizer also has one pad with a few buttons that stay unused on Linux, as there isn't any vendor software that reacts to them. I was always wondering if I could use them to execute some action.

@omsfah
Copy link
Author

omsfah commented Sep 8, 2022

I'm lucky enough that my drawing board comes shipped with software for this exact purpose, but I assume something like evdev should be able to detect and emulate keys thereafter, previously on Windows i used powertoys for this exact purpose. Might be worth checking out the wacom linux forums? On a side note, the xencelabs quickkeys are a great little macropad, which you can customise through their driver. Best of luck!

@sp1ritCS
Copy link
Contributor

sp1ritCS commented Sep 8, 2022

but I assume something like evdev should be able to detect and emulate keys thereafter

yes, I'm aware I can get the pad buttons events via evdev. I was more looking if there some kind of software specifically made for it. The Xencelabs driver seems to be licensed under the LGPL, but I'm not able to find any sources. Do they just provide them to customers?

@omsfah
Copy link
Author

omsfah commented Sep 8, 2022

I'm not sure, i know they have a presence on reddit subreddit - redittor/ company representative They have also previously shared their ARCH driver over G-disk to make it faster accessible for users, so they seem like a company that could maybe send you the info you need just to be nice. If you where looking for the driver it's located here

@sp1ritCS
Copy link
Contributor

sp1ritCS commented Sep 8, 2022

If you where looking for the driver it's located here

yes, I'm aware. The rpm package they provide as part of the driver archive has it's license field set to LGPL, but I suspect that this is incorrectly labeled as free software when it isn't.

@omsfah
Copy link
Author

omsfah commented Sep 8, 2022

Ahh, that might be. I guess a few companies get good representation based on the fact that few bother to check?

Speaking of freeware, if one wishes to donate some dollars for enjoying notekit, is there a "beerware" or similar option?

@sp1ritCS
Copy link
Contributor

sp1ritCS commented Sep 8, 2022

I guess a few companies get good representation based on the fact that few bother to check?

hanlon's razer. I'd prefer to think it's just someone that doesn't have much experience in packaging things and just added LGPL there, as the bundled QT libs carry an LGPL license, into the license field; and it propagated to other packages (i.e. the one in the AUR) from there.

Speaking of freeware, if one wishes to donate some dollars for enjoying notekit, is there a "beerware" or similar option?

Nothing official as far as I'm aware of. Could try looking if @blackhole89 has PayPal set up for his email he uses to commit.

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