Modifier Keys?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Re: Modifier Keys?

Post by SparkOut » Thu Jul 17, 2025 7:49 pm

richmond62 wrote:
Thu Jul 17, 2025 6:43 pm
and how would ctrl-alt-shift + key go down with Windows users?
Personally, I would say likely better than using Shift Lock.
But, what's the target user? Is it a user of non Roman alphabets (eg your Devawriter user base)? Or more of a Unicode power user tinkering with the character sets?
Either way, I think if you stated what the complications are, they would understand, and appreciate your efforts to make things as simple as possible. Depending on who it is you're writing this for might give you priorities in one direction over another.
Perhaps one modifier key could have a choice of actions, and an on screen button in the user interface coukd toggle between those choices?
Maybe "all the options at once" is a step too far? I think in the circumstances of what you're trying to achieve, most people would forgive a little extra required effort for the least frequently chosen options.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10308
Joined: Wed May 06, 2009 2:28 pm

Re: Modifier Keys?

Post by dunbarx » Thu Jul 17, 2025 9:47 pm

Richmond.

Calm down. :shock:

There are four "no-lock" control keys. That is six two-key combinations. You have five discrete needs. So, what am I missing?

Craig

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10089
Joined: Fri Feb 19, 2010 10:17 am

Re: Modifier Keys?

Post by richmond62 » Fri Jul 18, 2025 6:34 am

To start with I am not 'calmed up'. 8)

But several folk round these parts have started frothing at the mouth re using the capslock key as a modifier, and I can see why.

Hav8ng tried it myself I am aware of its shortcomings.

Oh, and re using ShiftLock: as I have no computrler built after 1989 woth that key it really cannot be considered. :D

So, Craig, it would be a great service if you could tell me those 6 2-key combinations.

stam
Posts: 3062
Joined: Sun Jun 04, 2006 9:39 pm

Re: Modifier Keys?

Post by stam » Fri Jul 18, 2025 9:24 am

richmond62 wrote:
Fri Jul 18, 2025 6:34 am
So, Craig, it would be a great service if you could tell me those 6 2-key combinations.
Weird how many here complain when newbies ask to be spoonfed code, but a simple question as to how you derive 6 pairs from 3 elements is an actual question.

The three elements:
shift key
alt (win) / option (Mac) key
powerkey (windows key, command key)

Basic combinations:
powerkey + shift
powerkey + alt
powerkey + ctrl
shift + ctrl
shift + alt
alt + ctrl

Not that hard.

And I'll re-iterate that 3 key combos (typically powerkey+alt+shift) are present in many apps on both Mac and Win (usually graphics apps where there are large number of menu commands mapped to key combos), so you have at least 4 more:
powerkey + alt + ctrl
powerkey + alt + shirt
powerkey + ctrl + shift
alt + ctrl + shift

And I have also used apps that use all 4: powerkey + alt + ctrl + shift.

I have not used any app ever that includes caps lock in a key combination.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10089
Joined: Fri Feb 19, 2010 10:17 am

Re: Modifier Keys?

Post by richmond62 » Fri Jul 18, 2025 10:59 am

Thank you.

I tried Capslock and was not happy with that, hence . . .

AND the reason I was having a prob. with '6' was I have always felt the powerkey/command was 'off'.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10089
Joined: Fri Feb 19, 2010 10:17 am

Re: Modifier Keys?

Post by richmond62 » Sat Jul 19, 2025 2:36 pm

I have tried all the 2 modifier keys combos I have not used, and they do NOT work, so:
-

Code: Select all

 if ctrlKey() is down and shiftkey() is down and altKey() is down then
      put numToCodePoint(122966) after fld "OOT"
      exit mouseUp
   end if
   if altKey() is down and shiftKey() is down then
      put numToCodePoint(122933) after fld "OOT"
      exit mouseUp
   end if
   if altKey() is down then
      put numToCodePoint(11767) after fld "OOT"
   else
      if shiftkey() is up then
         put numToCodePoint(1077) after fld "OOT"
      else
         if shiftkey() is down then
            put numToCodePoint(1045) after fld "OOT"
         end if
      end if
   end if
Like it or not:

if ctrlKey() is down and shiftkey() is down and altKey() is down then

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10089
Joined: Fri Feb 19, 2010 10:17 am

Re: Modifier Keys?

Post by richmond62 » Sat Jul 19, 2025 3:07 pm

Screenshot 2025-07-19 at 17.06.16.png

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10089
Joined: Fri Feb 19, 2010 10:17 am

Re: Modifier Keys?

Post by richmond62 » Sun Jul 20, 2025 8:31 pm

Someone in a different universe stated that:
hope this won't be a problem when you use:
CTRL ALT SHIFT S in Windows.
Well, okay it will, as that's "Save as..."
This makes NO sense to me at all, as, as far as I understand "Save as . ." on Windows normally uses CTRL SHIFT, or F12.

stam
Posts: 3062
Joined: Sun Jun 04, 2006 9:39 pm

Re: Modifier Keys?

Post by stam » Tue Jul 22, 2025 9:01 am

richmond62 wrote:
Sun Jul 20, 2025 8:31 pm
Someone in a different universe stated that:
hope this won't be a problem when you use:
CTRL ALT SHIFT S in Windows.
Well, okay it will, as that's "Save as..."
This makes NO sense to me at all, as, as far as I understand "Save as . ." on Windows normally uses CTRL SHIFT, or F12.
On MacOS, user interface (including key combos) is fairly standardised, not in the least because of Apple's HIG. There is an inherent intuitiveness built in, which is one of the reasons MacOS' user interface is popular.
What could me more logical than cmd-S for 'save' and cmd-shift-S for 'save as'... but such interface logic is not prevalent in the Windows ecosystem


On Windows my experience is that interface guidelines are much less adhered to, and various developers come up with their own ideas of how things should be. Some examples:
  • MS Office's strip, which I still consider an abomination.
  • 'F12' for 'save as', whereas other devs try to keep things more coherent by including some key combo with 'S' in it like MacOS does.
  • ctrl-W for close window (mimicking MacOS's cmd-W), but more widespread is alt-F4, which is fairly the opposite of intuitive.
I'm surprised you're surprised at Window's interface inconsistency. The prevailing logic in Windows apps seems to be 'do what you want', so... do what you want...

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10089
Joined: Fri Feb 19, 2010 10:17 am

Re: Modifier Keys?

Post by richmond62 » Tue Jul 22, 2025 11:49 am

I have done what I wanted: I was still concerned:

1. to make things not too difficult for end-users (that's why I dropped capslock).

2. not to screw up end-user's schemata for key combinations.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10044
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Modifier Keys?

Post by FourthWorld » Tue Jul 22, 2025 2:57 pm

Would it be simpler to use key combinations that leverage existing conventions on each OS?
https://support.microsoft.com/en-us/off ... c3774cfc76

Which will occur more often?:
- A user running one app on multiple OSes
- A user running multiple apps on one OS
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10089
Joined: Fri Feb 19, 2010 10:17 am

Re: Modifier Keys?

Post by richmond62 » Tue Jul 22, 2025 7:07 pm

The latter of the 2 is more likely to happen.

HOWEVER, as Shift+Ctrl+S is used across Mac, Win, & Linux for "save as . . ." (Shift+Ctrl+Alt+S being added in Windows in case users's fingers are so fat they splay over onto an Alt key . . . ROFL), I cannot see many Windows users jalousing at Shift+Ctrl+Alt+S being used for something else . . .

Certainly I am not overly motivated to have an OS-detection routine and muck things around so that Professor Stoyanka on her Mac trying to teach her doctoral student on Windows how to get a subscript 'C' (that's /s/ in Cyrillic) gets all hot and bothered because of different key commands on their computers.

Especially as a subscript 'jer' uses another key with Shift+Ctrl+Alt, as with the other 15+ subscripted letters.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10308
Joined: Wed May 06, 2009 2:28 pm

Re: Modifier Keys?

Post by dunbarx » Tue Jul 22, 2025 7:12 pm

Back at this just today, and astonished a what happened since my last post.

@Eeveryone but Richmond. I know you guys get it, but still not sure about Richmond.

@Richmond. With (on Mac, I am sure Windows can manage as well) with Shift, Control, Option and Command, you do not instantly see six two-key combinations?? Stam made a list, but I do not know what "powerKey" is doing there. Anyway:

Shift-Control
Shift-Option
Shift-Command
Control-Option
Control-Command
Option-Command

No locking keys, which we all agree are icky, though just as effective, and would double the combinations to 12. Do we now have this in hand?

Craig

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10089
Joined: Fri Feb 19, 2010 10:17 am

Re: Modifier Keys?

Post by richmond62 » Tue Jul 22, 2025 7:15 pm

Oh, and while my Professor Stoyanka is imaginary. Docent Maria Schnitter and her MacBook at the University of Plovdiv and Dr Hristo Saldzhiev and his Windows 10 machine at Stara Zagora University are very real, and corresponding colleagues.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10089
Joined: Fri Feb 19, 2010 10:17 am

Re: Modifier Keys?

Post by richmond62 » Wed Jul 23, 2025 12:10 pm

I do believe to avoid cross-platform confusion it is best to equate the COMMAND and the CONTROL buttons: which, of course, cuts down the number of 2 mod key combinations.

Post Reply