Sure. I used HC a lot when I was a bit younger, 30+ years ago.@Fjord. But do you see how this can work?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Sure. I used HC a lot when I was a bit younger, 30+ years ago.@Fjord. But do you see how this can work?
Code: Select all
//script local
local sTrackCommandKey
on mouseMove
if the commandKey is down then
put true into sTrackCommandKey
set the label of btn "XYZ" to "CmdKey Down"
else
put false into sTrackCommandKey
set the label of btn "XYZ" to "CmdKey Up"
end if
end mouseMove
//somewhere in the handling of the popup
//you may set the flag to false as well
//as in... put false into sTrackCommandKey
Code: Select all
on idle
if the sun has already burned out then..
Well, as one has a SHIFT, an ALT/OPTION key, and a CTRL key, as well as whole slewThis may impact processor-intense processes.
The idle solution will do what you're looking for, but is this app for yourself or to share with others?
Try this on a new card:2° function keys: I don’t know how to use these but that’s drifting from my original post.
Code: Select all
on functionKey tkey
answer tkey
end functionKey
Hi François. If there is no other user input than to press the commandKey, my suggestion will not help.
I agree 110% ! This app is just for myself; and even then, I may find that I forgot the double meaning of the button.The bigger challenge here seems less a technical concern in the messaging as much as a usability concern with having to remember a hidden option and also the means of revealing that option.
We spend so much time making our own software it's easy to forget how much time users spend with software that isn't ours.So being as gentle as possible with cognitive load goes a long way toward user satisfaction; users are busy, often distracted, and have to deal with a lot of systems all day that demand a lot of their attention.
Having both actions visible as separate buttons lets the user know there are two actions, without having to remember anything.
Interesting to know that… except for the fact that I couldn't find the "Use F1…" in System Prefs > Keyboard > Shortcuts. But no problem, for now.Try this on a new card:
CODE: SELECT ALL
on functionKey tkey
answer tkey
end functionKey
Note that you first have to go to the"Short Cuts" pane in the "keyBoard" pane in "System Preferences" and check the "Use F1, F2, etc keys..."
Nor could I: and just to be ridiculous, I checked in Mac OS 10.6.8 as well as Mac OS 12.5 beta 4.I couldn't find the "Use F1…" in System Prefs > Keyboard > Shortcuts.
Hi François,Fjord wrote: ↑Thu Jun 02, 2022 9:49 pmHi,
I'm wondering how / if I can change a button label just by holding, say, the command key. I have a button script along these lines:It would be much neater to have the button label change from 'do something' to 'do something to all' whenever the command key is pressed. But I can't find a way, other than using a 'on idle' handler (which is not recommended) or some kind of timer with 'send'.on mouseUp
if the eventCommandKey is up then
do something on the current card
else do the same thing on all cards
end mouseUp
Can one trap the pressing of the command key alone?
Code: Select all
on mouseUp whichButton
-- this is pseudo code, not LC syntax
if whichButton is not 3 then -- 3 = right button
do something on the current card
else do the same thing on all cards
end mouseUp