Blocking the Special Lock Key

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
kkleinfelter
Posts: 32
Joined: 21 Dec 2018, 10:59

Blocking the Special Lock Key

Post by kkleinfelter » 06 Jun 2023, 11:15

I need to block/disable a special key on my HP Zbook laptop.

There's a key with an icon that looks like

Code: Select all

|❏|
. When I press it, Windows behaves as if I'd pressed Winkey-L. i.e. It locks the workstation.

The problem is, that's a smaller-sized key immediately next to a smaller-sized ESC key, so I often lock Windows when I attempt to press ESC.

I want to use AHK to block this keystroke, but when I use AHK to tell me what that keystroke is, AHK shows that Winkey-L is pressed, and AHK can't block Winkey-L. VK = 4C, SC = 019.

Is there any way I can block this special key from locking my workstation?
TIA

User avatar
mikeyww
Posts: 27044
Joined: 09 Sep 2014, 18:38

Re: Blocking the Special Lock Key

Post by mikeyww » 06 Jun 2023, 11:18

This may sound dumb, but a different approach could be assigning a different key to send Esc. That would move you away from the key that you mentioned.

Alternative:

https://stackoverflow.com/questions/301053/re-assign-override-hotkey-win-l-to-lock-windows

https://www.thewindowsclub.com/enable-disable-win-l-shortcut-key-windows

kkleinfelter
Posts: 32
Joined: 21 Dec 2018, 10:59

Re: Blocking the Special Lock Key

Post by kkleinfelter » 06 Jun 2023, 11:52

Good suggestions. Thanks!

Relocating ESC is an interesting approach, but rewiring my brain to do that may be impossible at this point. I've been whacking the upper-leftmost key for ESC since 1980. I don't think I can rewire those neurons!

Entirely disabling the lock feature could get me fired for violating corp security policy.

Maybe my best option is to find a stick-on key cover, to prevent pressing the lock key.

User avatar
mikeyww
Posts: 27044
Joined: 09 Sep 2014, 18:38

Re: Blocking the Special Lock Key

Post by mikeyww » 06 Jun 2023, 11:57

Or:

1. New keyboard
2. New employer

:)

Actually, I don't recommend disabling the Windows lock. It is a security feature.

RussF
Posts: 1274
Joined: 05 Aug 2021, 06:36

Re: Blocking the Special Lock Key

Post by RussF » 06 Jun 2023, 13:28

In the images of the ZBook, that lock key is also on function key F1. I'm guessing that you have to hold the fn key to use the function keys F1 - F12. Sometimes that can be changed in the BIOS settings so that the regular function keys are the default and you must hold the fn key to get the "special" functions (brightness, volume, etc.). I personally prefer it that way because I use the regular function keys (especially with AHK) more often than I do the special ones. Is it a company-supplied laptop with a password-protected BIOS? If you can change it, then you would only be pressing F1 by mistake, which you can always disable with

Code: Select all

F1::Return
You always have Win-L to lock your screen if necessary.

Russ

User avatar
mikeyww
Posts: 27044
Joined: 09 Sep 2014, 18:38

Re: Blocking the Special Lock Key

Post by mikeyww » 06 Jun 2023, 13:34

That's a good idea, and you could also remap Ctrl+F1 to F1.

Code: Select all

#Requires AutoHotkey v2.0
$F1::Return
^F1::F1

Post Reply

Return to “Ask for Help (v2)”