Capture keystrokes in LM.GUI dialog?

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
dstofka
Posts: 12
Joined: Mon Sep 26, 2016 2:38 pm

Capture keystrokes in LM.GUI dialog?

Post by dstofka »

I'm writing a script that has different modes, and I want to be able to quickly trigger them with a second keystroke after my initial keyboard shortcut invokes the script itself. So if I set up [ShiftT] as the keyboard shortcut to my script, I want to be able to press [ShiftT]-then-[1], or [ShiftT]-then-[2], or [ShiftT]-then-[3], etc. to access the different modes of my script.

Since keystrokes have the inherent possibility of being attached to other tools, I was wondering if this could be accomplished using a modal dialog box that immediately comes up when the script is invoked. Is there a way to listen for a single keystroke in a dialog box or attach keyboard shortcuts to custom GUI buttons?
User avatar
synthsin75
Posts: 9978
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Capture keystrokes in LM.GUI dialog?

Post by synthsin75 »

Not currently possible.
User avatar
570295535
Posts: 12
Joined: Sat Feb 04, 2023 9:32 am

Re: Capture keystrokes in LM.GUI dialog?

Post by 570295535 »

This can only be done with one master script and two additional scripts, each binding its own shortcut key.
Post Reply