barrettford/Octoprint-Usb_keyboard

Long & short btn presses - Modifier keys?

Closed this issue · 7 comments

First of all thank you. It is a great idea and work to replace/expand the old rotary style input system.

So seeing this plugin I was immediately thinking about making a custom 'keyboard' with an arduino 32U4 and some standalone buttons.
My question is that is it technically possible to assign to single and to long presses different functions?
This would kind of half the required number of physical buttons I imagine.

Thanks again!

I made a decision early on to not differentiate button press lengths due to how much extra processing was required. I may add the ability in later, but I don't think so now. However, I do think that adding modifier keys would be a good idea. I'll explore that.

My idea would be multiple "layers" of commands (on layer 1 "Enter" does X, on layer 2 it does Y and so on) and the possibility to bind a "layer change" command to one key.

Would you be able to add the ability to hold down a button and repeats the command/subsection of the command? For example, moving the axis.

My idea would be multiple "layers" of commands (on layer 1 "Enter" does X, on layer 2 it does Y and so on) and the possibility to bind a "layer change" command to one key.

Question, what is the usecase? Do you have an example of exactly how you'd use this feature, step by step?
How is this not doable with the current variable system?

Must admit this is one of the best octoprint plugins I've used. I can now use a wireless keyboard to control my octoprint quickly it's quite incredible and basically free. The only things missing for me are the ability to have buttons to be able to be held down as I stated above and also the ability for users to create their own if conditions.

For example toggling heaters on and off with the use of one button.

Hatts of to the dev on this one though hope it gets the traction it deserves

Look at the supplied 10key examples. I use one button for the Gcode to set heater temperature, but I use variables for the temperature values, and I listen/save those variables using a master variable key.

EDIT: Seems this breaks config. You can download it anyway with https://github.com/barrettford/OctoPrint-Usb_keyboard/archive/update-settings.zip if you want

I've added a new command type "set_active_profile" which will allow you to have several profiles all accessible from each other. This should give you the ability to create Meta keys that change the board's functionality on-the-fly.

74bfaa3
Please give it a try and tell me if it works.

Install newest version manually with https://github.com/barrettford/OctoPrint-Usb_keyboard/archive/master.zip if you want to test before the notification comes in.