LightBurn runs on $2.10 Linux tablet

So I figured out that LightBurn triggers the Frame buttons on the “button-up” event which I think will help here. I’m thinking of 3 finger pinch doing the shift modifier might be good way to do this but will test with 2 finger pinch(easier) first.

The idea is to first push and hold the Frame button and while holding it use another finger for a pinch gesture which triggers the Shift_L modifier.

This sounds like you playing Twister on the touchscreen. :rofl:

I can’t get pinching to do anything but I can get tapping( 2 and 3 finger ) to do things from the drop-down options( maximize, toggle size, minimize, etc ).

Not sure where to go from here… the taps all have to be simultaneous so I can’t click the Frame button and then a tap operation. I was really hoping the pinch would allow one figure to trigger the Frame button-down event then the pinch with a 2nd finger trigger the Shift_L modifier on release/end of the pinch.

Gotta figure out why pinch isn’t working. Boy, a hot-key sequence seems it would really help but I don’t know how interested LightBurn is on getting tablet/touch-only capabilities functional.

Did you look at chaining both the keyboard action and a mouse action in the same event?

Honestly, the easiest thing might be to request a LightBurn feature to add a keyboard shortcut for framing.

I don’t think that’s possible, ie chaining different event types and then again, I’m not sure how to implement this given multi finger events require simultaneous touching of the x number of fingers so I don’t know how I would initiate the click.

There is no one finger down, 2nd finger down and both release action.

Best operation I can think of would be if this were possible:
one finger down(presses the Frame button), 2nd finger down and swipe or both-release activates the Shift_L modifier.

with a keyboard:
I can press and hold the Frame button, then press/hold the keyboard Shift key and on button release the Frame does the diode low power fire.

it’s getting weird.

with Keyboard:
Alt-Shift+r does the rubberband AND fires the laser.
Shift-Alt+r does the rubberband AND fires the laser…
Alt+r does square frame, no laser
I can’t get square frame AND laser with hotkeys.

With Gestures 2 finger tap and 3 finger tap
I record Shift_L+Alt_L+r which should trigger rubberband w/laser but it only does rubberband.
Alt_L+Shift_L+r also just does rubberband with no laser.
Alt_L+r does square frame as it should.

odd is that the 3 key gestures don’t trigger the laser and my guess is that it is because the first modifier(Shift) acts on the RELEASE of Alt+r and the gesture system does not have a release capability.

Is it possible to set shift to one gesture, and alt+r to another gesture? and initiate the gestures in that order?

I’ve not found a way to chain multiple gesture definitions.
But I still don’t think it’d work since the button action is on ‘button release’ and the gestures are probably being applied to button press events.

You can test with a keyboard and mouse by holding shift down and pressing(mouse) the Frame button. It will not act on the frame operation until you release the button.

On the tablet with a keyboard connected I can do Shift-Alt-r and Alt-Shift-r and both of those will do the rubberband framing WITH the laser firing. But with the gesture system, any of those defined as 2 finger tap just does rubber band framing but with no laser firing. So something is different and I think it’s how LightBurn acts on the button release.

Dratt, I just did a physical keyboard Shift-Alt-r press and the Ortur fired the laser and did the rubberband framing. So the hotkey triggers on the press while the buttons trigger on the button release.

Because of the differences between a Shift-Alt-r(rubberband) and an Alt-r(box) I have to believe that Touchegg is indeed sending the 3 key sequence but for some reason that is different than what a real keyboard sends. I have 2 finger tap doing Shift-Alt-r and 3 finger tap doing Alt-r and as 3 finger tap does rubberband(no laser) and 2 finger tap does box(no laser). Repeating myself, doing Sift-Alt-r on the keyboard does rubberband( WITH laser ).

@adammhaile any chance you can try the xdotool on one of your Linux machines to see how the same keystrokes trigger the hotkey operation of framing but do not trigger the fire operation?
The sleep is to give you time to run it in a terminal and then switch LightBurn to the focus for the key sequence injection.

sleep 3 && xdotool key alt+shift+r

Using python I got a script to trigger the proper keystrokes to get LightBurn to fire the laser on the rubberband frame operation!

apt install python3-pip python3-tk python3-dev
pip install pyautogui

import pyautogui

# this did not work
#pyautogui.hotkey('shift','alt','r')

# this works
pyautogui.keyDown('shift')
pyautogui.keyDown('alt')
pyautogui.keyDown('r')
pyautogui.keyUp('r')
pyautogui.keyUp('alt')
pyautogui.keyUp('shift')
1 Like

Yippee! That’s fantastic. What do you think was the difference? How are you triggering the script?

I’m guessing but I think LightBurn might be doing hotkeys but looking for a hotkey, dropping to another level(state machine) looking for more keys until a sequence meets the test criteria. The other keyboard messages are all sent at once. Why the pyautogui.hotkey() call doesn’t work but the sequential keyDown() and then keyUp() calls does is a bit odd but again it is probably timing or maybe hotkey() does combine modifiers.

Touchegg gestures can call commands so as long as LightBurn remains the active app on the gesture calling the python script it’ll work.

It would be good if LightBurn could add a hotkey sequence to fire on the square frame button since sometimes you just want the extents of the design.

I have a batch of these tablets coming at the end of the week and look forward to getting them up and running. This will be my first crack at Linux, so I’m hoping all will go smoothly. Thanks for the information you have shared so far. I may circle back around with a few questions.

1 Like

A pleasant surprise after moving from Pop! OS 21.10 to Kubuntu 21.10 and that is the virtual/onscreen keyboard(OSK) will hold the Shift key modifier into the system so it works in conjunction with the GUI/Touch system. Result, to do the diode laser fire-framing I pull up the OSK, tap Shift then tap either of the framing buttons. Sweeet. My guess is that this is because the KDE interface and OSK inject key messages into the same message queue that the Qt based LightBurn software is using.

Kubuntu is not as fast/responsive as Xubuntu nor Lubuntu and I will hammer on it for a bit to see if it is the better OS for these touchscreens. The system-wide GUI tweaking capabilities are all there and with the ~/.config/autostart folder handling things like launching the auto-rotate script and the onboard OSK with a GUI tool for setting up the auto start apps.

Kubuntu is my everyday driver OS so I do have a slant towards it over all other desktops. But I use Lubuntu on may of the bootable OS images I’ve used for workshops and clubs like an IoT workshop did, A setup for a Makerspace with a Makerbot 3rd Gen for elementary age kids to use and an autonomous car project which needed CUDA capabilities enabled. So not overly sold on a desktop without reason. Fingers crossed Kubuntu continues to work well on these tablets.

1 Like

Great news. It sounds like this may simplify the setup when I get to that point.

Hey there Doug. I got it installed on the same tablet also running POP. Touch screen is much better than it was in Mint. I haven’t been able to get LB to size right. It will change size on the width but not height so I only see about 70% of the upper part of the screen. Any tips?

Cool and yes, getting LightBurn to size correctly was a bit of pain. What I did was I pulled out the 2 lower sections on the right( Laser, Variable Text ) and then placed them back into the upper section. This allows the main LightBurn window to size smaller in the Y axis.

1 Like

The workflow with a 10" tablet at the K40 Laser Cutter works pretty good. I installed SMB network file sharing on my desktop machine( Kubuntu 18.04 ) and on the tablet( Kubuntu 21.10 ). I created a folder named 000xfer under my normal Laser Stuff folder and share it on my desktop machine. When I’m ready to cut a design I copy or save the file to the 000xfer, go to the laser with the tablet, open the file browser and set to Split-Screen( 2 directory windows ) and open the network, browse to the shared 000xfer folder and drag-n-drop the design file into my local Laser Stuff folder then open it in LightBurn.

So far the only hassle is how small the power and speed adjusting arrows are and how fat my fingers are. I also forgot and had to add some fonts which were on my desktop but not on my tablet even though LightBurn still handled the design text outline without the font installed.

A VERY usable workflow.

1 Like

Not sure if it would work but have you explored any screen magnifying capabilities to remedy this? Maybe one designed for accessibility concerns.

I’m trying to imagine how this would play out with the touch setup you have but surely there’s a way to do this.

1 Like