The keyboard filter module allows you to block certain keys or key combinations, great for blocking access to the Windows 10 Virtual Desktop manager so users cannot create a new virtual desktop to hide in.


The keyboard keys map directly to the Windows Keys Enum, found on the Microsoft website here: https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.keys


Usage Rules:


  • Enter a single Key to block that Key, such as LWin and the Left Windows Key will no longer function.
  • Enter multiple Keys separated by + and the first keys will represent Modifier Keys, for example: LWin+R ... this will block the user opening the Run Box using the left Windows Key
  • Enter multiple Blocks by separating the commands by semi-colon ( ; ) .. for example: LWin+R;RWin+R will block the Run Box from both the left and right windows keys


Here is an example that will completely block the a new Windows Virtual Desktop from being created, and also block the Windows+Tab Application/Desktop Manager from opening:


LWin+ControlKey+D;RWin+ControlKey+D;LWin+Tab;RWin+Tab


Each of the above 4 key combinations will be blocked.


It is recommended to test your Key combinations on a pc by running it directly, then once successful, copying the command to a new policy.



For reference in case the Microsoft Reference Page is moved or deleted, the following table is a copy from that page and you can use the first column to build your Key commands:


Fields 


A65The A key.
Add107The add key.
Alt262144The ALT modifier key.
Apps93The application key (Microsoft Natural Keyboard).
Attn246The ATTN key.
B66The B key.
Back8The BACKSPACE key.
BrowserBack166The browser back key (Windows 2000 or later).
BrowserFavorites171The browser favorites key (Windows 2000 or later).
BrowserForward167The browser forward key (Windows 2000 or later).
BrowserHome172The browser home key (Windows 2000 or later).
BrowserRefresh168The browser refresh key (Windows 2000 or later).
BrowserSearch170The browser search key (Windows 2000 or later).
BrowserStop169The browser stop key (Windows 2000 or later).
C67The C key.
Cancel3The CANCEL key.
Capital20The CAPS LOCK key.
CapsLock20The CAPS LOCK key.
Clear12The CLEAR key.
Control131072The CTRL modifier key.
ControlKey17The CTRL key.
Crsel247The CRSEL key.
D68The D key.
D048The 0 key.
D149The 1 key.
D250The 2 key.
D351The 3 key.
D452The 4 key.
D553The 5 key.
D654The 6 key.
D755The 7 key.
D856The 8 key.
D957The 9 key.
Decimal110The decimal key.
Delete46The DEL key.
Divide111The divide key.
Down40The DOWN ARROW key.
E69The E key.
End35The END key.
Enter13The ENTER key.
EraseEof249The ERASE EOF key.
Escape27The ESC key.
Execute43The EXECUTE key.
Exsel248The EXSEL key.
F70The F key.
F1112The F1 key.
F10121The F10 key.
F11122The F11 key.
F12123The F12 key.
F13124The F13 key.
F14125The F14 key.
F15126The F15 key.
F16127The F16 key.
F17128The F17 key.
F18129The F18 key.
F19130The F19 key.
F2113The F2 key.
F20131The F20 key.
F21132The F21 key.
F22133The F22 key.
F23134The F23 key.
F24135The F24 key.
F3114The F3 key.
F4115The F4 key.
F5116The F5 key.
F6117The F6 key.
F7118The F7 key.
F8119The F8 key.
F9120The F9 key.
FinalMode24The IME final mode key.
G71The G key.
H72The H key.
HanguelMode21The IME Hanguel mode key. (maintained for compatibility; use HangulMode)
HangulMode21The IME Hangul mode key.
HanjaMode25The IME Hanja mode key.
Help47The HELP key.
Home36The HOME key.
I73The I key.
IMEAccept30The IME accept key, replaces IMEAceept.
IMEAceept30The IME accept key. Obsolete, use IMEAccept instead.
IMEConvert28The IME convert key.
IMEModeChange31The IME mode change key.
IMENonconvert29The IME nonconvert key.
Insert45The INS key.
J74The J key.
JunjaMode23The IME Junja mode key.
K75The K key.
KanaMode21The IME Kana mode key.
KanjiMode25The IME Kanji mode key.
KeyCode65535The bitmask to extract a key code from a key value.
L76The L key.
LaunchApplication1182The start application one key (Windows 2000 or later).
LaunchApplication2183The start application two key (Windows 2000 or later).
LaunchMail180The launch mail key (Windows 2000 or later).
LButton1The left mouse button.
LControlKey162The left CTRL key.
Left37The LEFT ARROW key.
LineFeed10The LINEFEED key.
LMenu164The left ALT key.
LShiftKey160The left SHIFT key.
LWin91The left Windows logo key (Microsoft Natural Keyboard).
M77The M key.
MButton4The middle mouse button (three-button mouse).
MediaNextTrack176The media next track key (Windows 2000 or later).
MediaPlayPause179The media play pause key (Windows 2000 or later).
MediaPreviousTrack177The media previous track key (Windows 2000 or later).
MediaStop178The media Stop key (Windows 2000 or later).
Menu18The ALT key.
Modifiers-65536The bitmask to extract modifiers from a key value.
Multiply106The multiply key.
N78The N key.
Next34The PAGE DOWN key.
NoName252A constant reserved for future use.
None0No key pressed.
NumLock144The NUM LOCK key.
NumPad096The 0 key on the numeric keypad.
NumPad197The 1 key on the numeric keypad.
NumPad298The 2 key on the numeric keypad.
NumPad399The 3 key on the numeric keypad.
NumPad4100The 4 key on the numeric keypad.
NumPad5101The 5 key on the numeric keypad.
NumPad6102The 6 key on the numeric keypad.
NumPad7103The 7 key on the numeric keypad.
NumPad8104The 8 key on the numeric keypad.
NumPad9105The 9 key on the numeric keypad.
O79The O key.
Oem1186The OEM 1 key.
Oem102226The OEM 102 key.
Oem2191The OEM 2 key.
Oem3192The OEM 3 key.
Oem4219The OEM 4 key.
Oem5220The OEM 5 key.
Oem6221The OEM 6 key.
Oem7222The OEM 7 key.
Oem8223The OEM 8 key.
OemBackslash226The OEM angle bracket or backslash key on the RT 102 key keyboard (Windows 2000 or later).
OemClear254The CLEAR key.
OemCloseBrackets221The OEM close bracket key on a US standard keyboard (Windows 2000 or later).
Oemcomma188The OEM comma key on any country/region keyboard (Windows 2000 or later).
OemMinus189The OEM minus key on any country/region keyboard (Windows 2000 or later).
OemOpenBrackets219The OEM open bracket key on a US standard keyboard (Windows 2000 or later).
OemPeriod190The OEM period key on any country/region keyboard (Windows 2000 or later).
OemPipe220The OEM pipe key on a US standard keyboard (Windows 2000 or later).
Oemplus187The OEM plus key on any country/region keyboard (Windows 2000 or later).
OemQuestion191The OEM question mark key on a US standard keyboard (Windows 2000 or later).
OemQuotes222The OEM singled/double quote key on a US standard keyboard (Windows 2000 or later).
OemSemicolon186The OEM Semicolon key on a US standard keyboard (Windows 2000 or later).
Oemtilde192The OEM tilde key on a US standard keyboard (Windows 2000 or later).
P80The P key.
Pa1253The PA1 key.
Packet231Used to pass Unicode characters as if they were keystrokes. The Packet key value is the low word of a 32-bit virtual-key value used for non-keyboard input methods.
PageDown34The PAGE DOWN key.
PageUp33The PAGE UP key.
Pause19The PAUSE key.
Play250The PLAY key.
Print42The PRINT key.
PrintScreen44The PRINT SCREEN key.
Prior33The PAGE UP key.
ProcessKey229The PROCESS KEY key.
Q81The Q key.
R82The R key.
RButton2The right mouse button.
RControlKey163The right CTRL key.
Return13The RETURN key.
Right39The RIGHT ARROW key.
RMenu165The right ALT key.
RShiftKey161The right SHIFT key.
RWin92The right Windows logo key (Microsoft Natural Keyboard).
S83The S key.
Scroll145The SCROLL LOCK key.
Select41The SELECT key.
SelectMedia181The select media key (Windows 2000 or later).
Separator108The separator key.
Shift65536The SHIFT modifier key.
ShiftKey16The SHIFT key.
Sleep95The computer sleep key.
Snapshot44The PRINT SCREEN key.
Space32The SPACEBAR key.
Subtract109The subtract key.
T84The T key.
Tab9The TAB key.
U85The U key.
Up38The UP ARROW key.
V86The V key.
VolumeDown174The volume down key (Windows 2000 or later).
VolumeMute173The volume mute key (Windows 2000 or later).
VolumeUp175The volume up key (Windows 2000 or later).
W87The W key.
X88The X key.
XButton15The first x mouse button (five-button mouse).
XButton26The second x mouse button (five-button mouse).
Y89The Y key.
Z90The Z key.
Zoom251The ZOOM key.



Credit goes to Richard Marsh of Telford and Wrekin Council for this idea.