Page 1 of 1

Trapping The Windows Key.

Posted: Tue Apr 13, 2021 4:39 am
by Googie85
Hi Guys!!

I have the following code:

Code: Select all

on rawKeyDown keyCode
   if keyCode = "65388" then

            end if
end rawKeyDown
The code traps the Windows Key, but, I am trying to stop it from showing the start menu. Is it possible to "press" the Escape Key and stop the menu from showing??

Many Thanks,

Googie.

Re: Trapping The Windows Key.

Posted: Tue Apr 13, 2021 9:42 am
by AxWald
Nope.

The Win key doesn't fire rawKeyDown at all - it opens the start menu immediately, not even reaching LC.

Have fun!

Re: Trapping The Windows Key.

Posted: Tue Apr 13, 2021 9:48 am
by richmond62
It would be wonderful if someone could compile a list of keys on a keyboard (err, where else?)
that did NOT send either rawKeyDown/Up or keyDown/Up signals cross-platform.
-
SShot 2021-04-13 at 11.47.38.png
SShot 2021-04-13 at 11.47.38.png (34.21 KiB) Viewed 16253 times

Re: Trapping The Windows Key.

Posted: Tue Apr 13, 2021 9:49 am
by Googie85
That’s strange... it seems to work fine on my PC... thanks heaps!!!

Re: Trapping The Windows Key.

Posted: Tue Apr 13, 2021 10:46 am
by FourthWorld
This isn't a LiveCode issue as much as just how Windows works.

The Windows key, along with CTL-ALT-DEL and possibly others, route through different interrupts than standard keys, overridable only by replacing a lower-level DLL, not something a scripting language is normally expected to do:
https://stackoverflow.com/questions/134 ... elete-in-c

Given that the Windows key has such a special role, almost universally allowed by applications, you may want to think long and hard about overriding such well-established user expectations.

Re: Trapping The Windows Key.

Posted: Tue Apr 13, 2021 11:30 am
by richmond62
I am trying to stop it from showing the start menu.
I am sure that will put someone's nose out of joint.

BUT, if you insist, how about using the Backdrop?

Does the backdrop cover the Windows Start Bar?

It does NOT cover the MacOS Dock.