Trapping The Windows Key.

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Googie85
Posts: 199
Joined: Tue Aug 05, 2014 10:07 am

Trapping The Windows Key.

Post by Googie85 » Tue Apr 13, 2021 4:39 am

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.

AxWald
Posts: 578
Joined: Thu Mar 06, 2014 2:57 pm

Re: Trapping The Windows Key.

Post by AxWald » Tue Apr 13, 2021 9:42 am

Nope.

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

Have fun!
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9250
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Trapping The Windows Key.

Post by richmond62 » Tue Apr 13, 2021 9:48 am

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 4607 times

Googie85
Posts: 199
Joined: Tue Aug 05, 2014 10:07 am

Re: Trapping The Windows Key.

Post by Googie85 » Tue Apr 13, 2021 9:49 am

That’s strange... it seems to work fine on my PC... thanks heaps!!!

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Trapping The Windows Key.

Post by FourthWorld » Tue Apr 13, 2021 10:46 am

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.
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: 9250
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Trapping The Windows Key.

Post by richmond62 » Tue Apr 13, 2021 11:30 am

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.

Post Reply

Return to “Windows”