Working with windows10 shortcuts

Published on by Yousfi Benameur


Keyboard shortcuts are combinations of two or more keys that perform a task that would typically require a mouse or other pointing device. Keyboard shortcuts can save you time and effort as you use Windows and other apps.
Windows10 introduces new applications and then new shortcuts(as public or hotkeys).
using the native vfp shortcuts work in majority only on the vfp environment and cannot work on desktop apps.
the rescue is the keybd_event API whose can simulate all the keyboard keys and send them to desktop.
the virtual keyboard keys can be acquired from the msdn link below.
i simulate 18 shortcuts (with the new ones) and expose the method to do that.can extend to any other shortcut.
i used a top level form with alwaysOntop=.t.  and a contextuel menu  packed in the form methods(ym1 to ym17)
instead an mpr classic menu.

NB:Sendkeys script method can also used but with no great performances.
This code of course can embed in a systray class and stays in traybar with the same menu under the hand.

refrences used for this article:
Keyboard shortcuts   http://windows.microsoft.com/en-us/windows-10/keyboard-shortcuts
Virtual-Key Codes    https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731%28v=vs.85%29.aspx

in the second part see the photos relative to the window prompt(cmd.exe) and new effects introduced(transparency+search dialog).


Click on code to select [then copy] -click outside to deselect

 

Publi oform
oform=Newobject("yshortcuts")
oform.Show
Read Events
Retu

*
Define Class yshortcuts As Form
    BorderStyle = 0
	Height = 80
	Width = 318
	ShowWindow = 2
	Caption = ""
	MaxButton = .F.
	AlwaysOnTop = .T.
	Name = "Form1"

	Add Object command1 As CommandButton With ;
		Top = 4, ;
		Left = 1, ;
		Height = 73, ;
		Width = 313, ;
		FontBold = .T., ;
		FontSize = 14, ;
		Caption = "Shortcuts menu", ;
		MousePointer = 15, ;
		BackColor = Rgb(0,255,0), ;
		Name = "Command1"

	Procedure ym1
	&&stroke win+tab to fire the windows10 start menu
	Messagebox("this code fires the windows10 start menu by Windows key-click out to close i.",0+32+4096,"",2000)

	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer
	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1

	#Define VK_LWIN 0x5B  &&Left Windows key (Natural keyboard)
	#Define VK_RWIN 0x5C  &&Right Windows key (Natural keyboard)


	keybd_event( VK_RWIN, 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_RWIN, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	DoEvents
	Endproc

	Procedure ym2
	_Screen.ActiveForm.WindowState=1
	Local m.myvar
	TEXT to m.myvar noshow
this code fires Snapping window: WIN + LEFT or RIGHT (can be used with UP or DOWN to get into quadrants).Clik on seleted window to activate it
Windows Key + Left – Snap current window to the left side of the screen.
Windows Key + Right – Snap current window the the right side of the screen.
Windows Key + Up – Snap current window to the top of the screen.
	ENDTEXT
	Messagebox(m.myvar,0+32+4096,"",3000)

	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer
	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1

	#Define VK_LWIN 0x5B  &&Left Windows key (Natural keyboard)
	#Define VK_RWIN 0x5C  &&Right Windows key (Natural keyboard)
	#Define VK_LEFT  0x25  &&LEFT ARROW key
	#Define VK_RIGHT 0x27  &&right arrow key


	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_LEFT, 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_LEFT, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	DoEvents
	Endproc

	Procedure ym3
	&&stroke win+tab to fire the windows10 tasks
	Local m.myvar
	TEXT to m.myvar noshow
this code fire the windows10 windows tasks.Can click on any window to activate it !
Windows Key + Tab – This opens the new Task View interface, and it stays open 
— you can release the keys. Only windows from your current virtual desktop will  appear in the Task View list, and you can use the virtual desktop switcher at the bottom of the screen to switch between virtual desktops.
	ENDTEXT
	Messagebox(m.myvar,0+32+4096,"",3000)
	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer
	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1

	#Define VK_LWIN 0x5B  &&Left Windows key (Natural keyboard)
	#Define VK_RWIN 0x5C  &&Right Windows key (Natural keyboard)
	#Define VK_TAB  0x09  &&TAB key

	keybd_event( VK_RWIN, 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_TAB, 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_RWIN, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_TAB, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	DoEvents
	Endproc

	Procedure ym4
	_Screen.WindowState=1
	Local m.myvar
	TEXT to m.myvar noshow
this codecreate a new virtual desktop(WIN+CTRL+D)
Windows Key + Ctrl + D – Create a new virtual desktop and switch to it
Important: Windows Key + Ctrl + F4 – Close the current virtual desktop.
Windows Key + Ctrl + Left / Right – Switch to the virtual desktop on the left or right.
	ENDTEXT
	Messagebox(m.myvar,0+32+4096,"",3000)

	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer
	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1

	#Define VK_LWIN 0x5B 	   &&Left Windows key (Natural keyboard)
	#Define VK_RWIN 0x5C       &&Right Windows key (Natural keyboard)
	#Define  VK_CONTROL 0x11   &&CTRL key
	#Define VK_D 0x44          &&D key


	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_CONTROL ,0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_D ,0, KEYEVENTF_EXTENDEDKEY, 0 )

	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_CONTROL, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_D, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	DoEvents
	Endproc

	Procedure ym5
	Local m.myvar
	TEXT to m.myvar noshow
Ctrl+Shift+Esc — open the Windows 10 Task Manager.
	ENDTEXT
	Messagebox(m.myvar,0+32+4096,"",2000)

	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer

	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1

	#Define  VK_CONTROL 0x11  &&CTRL key
	#Define VK_LSHIFT 0xA0    &&Left SHIFT key
	#Define VK_RSHIFT 0xA1    &&Right SHIFT key
	#Define  VK_ESCAPE 0x1B   &&ESC key

	keybd_event( VK_CONTROL , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_LSHIFT  , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_ESCAPE  , 0, KEYEVENTF_EXTENDEDKEY, 0 )

	keybd_event( VK_CONTROL  , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_LSHIFT  , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_ESCAPE  , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	DoEvents
	Endproc

	Procedure ym6
	_Screen.WindowState=1
	Local m.myvar
	TEXT to m.myvar noshow
this code OpensTHE SETTINFGS APPS PANEL.
Windows Key +I
	ENDTEXT
	Messagebox(m.myvar,0+32+4096,"",2000)

	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer

	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1

	#Define VK_LWIN 0x5B 	   &&Left Windows key (Natural keyboard)
	#Define VK_RWIN 0x5C       &&Right Windows key (Natural keyboard)
	#Define VK_I    0x49     &&S key

	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_I   , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_I   , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	DoEvents
	Endproc

	Procedure ym7
	_Screen.WindowState=1
	Local m.myvar
	TEXT to m.myvar noshow
this code OPEN THE WINDOWS RUN DIALOGBOX
Windows Key +R
	ENDTEXT
	Messagebox(m.myvar,0+32+4096,"",2000)
	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer

	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1

	#Define VK_LWIN 0x5B 	   &&Left Windows key (Natural keyboard)
	#Define VK_RWIN 0x5C       &&Right Windows key (Natural keyboard)
	#Define VK_R    0x52     &&R key

	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_R  , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_R  , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	DoEvents
	Endproc

	Procedure ym8
	Messagebox("this code fire the historical windows activated-can navigate with left/right arrow or click to activate window.)",0+32+4096,"",1500)
	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer
	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1

	#Define VK_LWIN 0x5B  &&Left Windows key (Natural keyboard)
	#Define VK_RWIN 0x5C  &&Right Windows key (Natural keyboard)
	#Define VK_TAB  0x09  &&TAB key

	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_TAB , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_TAB , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	DoEvents
	Endproc

	Procedure ym9
	_Screen.WindowState=1
	Local m.myvar
	TEXT to m.myvar noshow
Alt + Tab – This isn’t a new keyboard shortcut, and it works just like you’d expect it to. Pressing Alt+Tab lets you switch between your open Windows. Tap Tab again to flip between windows and release the keys to select a window. Alt+Tab now uses the new Task View-style larger thumbnails. Unlike Windows Key + Tab, Alt + Tab lets you switch between open windows on all virtual desktops.
	ENDTEXT
	Messagebox(m.myvar,0+32+4096,"",2500)
	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer
	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1

	#Define VK_MENU  0x12   &&ALT key
	#Define VK_TAB  0x09  &&TAB key


	keybd_event( VK_MENU , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_TAB  , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_MENU , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_TAB  , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	DoEvents
	Endproc

	Procedure ym10
	_Screen.WindowState=1
	Local m.myvar
	TEXT to m.myvar noshow
	this code OPEN THE context menu windows button
	Windows Key +X
	ENDTEXT
	Messagebox(m.myvar,0+32+4096,"",2000)
	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer

	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1

	#Define VK_LWIN 0x5B 	   &&Left Windows key (Natural keyboard)
	#Define VK_RWIN 0x5C       &&Right Windows key (Natural keyboard)
	#Define VK_X    0x58     &&X key

	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_X  , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_X  , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	DoEvents
	Endproc

	Procedure ym11
	_Screen.WindowState=1
	Local m.myvar
	TEXT to m.myvar noshow
Windows Key+PrtScr — take a screenshot saved to your Pictures folder (without saving by dialogBox).
	ENDTEXT
	Messagebox(m.myvar,0+32+4096,"",2000)

	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer

	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1

	#Define VK_LWIN 0x5B  &&Left Windows key (Natural keyboard)
	#Define VK_SNAPSHOT 0x2C  &&print screen key

	keybd_event( VK_LWIN , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_SNAPSHOT   , 0, KEYEVENTF_EXTENDEDKEY, 0 )

	keybd_event( VK_LWIN  , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_SNAPSHOT  , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )

	DoEvents
	Endproc

	Procedure ym12
	Local m.myvar
	TEXT to m.myvar noshow
Windows Key+Home — minimize all windows except the one you’re actively using Windows Key +HOME
	ENDTEXT
	Messagebox(m.myvar,0+32+4096,"",2000)

	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer

	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1

	#Define VK_LWIN 0x5B 	   &&Left Windows key (Natural keyboard)
	#Define VK_RWIN 0x5C       &&Right Windows key (Natural keyboard)
	#Define VK_HOME   0x24     &&HOME key

	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_HOME  , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_HOME  , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	DoEvents
	Endproc

	Procedure ym13
	_Screen.WindowState=1
	Local m.myvar
	TEXT to m.myvar noshow
this code OPEN THE ACTION CENTER OR NOTIFICATIONS CENTER
Windows Key + A
	ENDTEXT
	Messagebox(m.myvar,0+32+4096,"",2000)

	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer

	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1

	#Define VK_LWIN 0x5B 	   &&Left Windows key (Natural keyboard)
	#Define VK_RWIN 0x5C       &&Right Windows key (Natural keyboard)
	#Define VK_A    0x41       &&A key


	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_A ,0, KEYEVENTF_EXTENDEDKEY, 0 )

	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_A, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	DoEvents
	Endproc

	Procedure ym14
	_Screen.WindowState=1
	Local m.myvar
	TEXT to m.myvar noshow
this code OPEN THE CORTANA app to seacrh any string (disc or web if enabled).
CLICK OUT ON ANY POINT TO CLOSE IT.
Windows Key +S
	ENDTEXT
	Messagebox(m.myvar,0+32+4096,"",2000)

	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer

	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1

	#Define VK_LWIN 0x5B 	   &&Left Windows key (Natural keyboard)
	#Define VK_RWIN 0x5C       &&Right Windows key (Natural keyboard)
	#Define VK_C    0x53       &&S key

	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_C   , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_C   , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	DoEvents
	Endproc

	Procedure ym15
	_Screen.WindowState=1
	Local m.myvar
	TEXT to m.myvar noshow
this code OPEN THE WINDOWS EXPLORER
Windows Key +E
	ENDTEXT
	Messagebox(m.myvar,0+32+4096,"",2000)

	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer

	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1

	#Define VK_LWIN 0x5B 	   &&Left Windows key (Natural keyboard)
	#Define VK_RWIN 0x5C       &&Right Windows key (Natural keyboard)
	#Define VK_E    0x45     &&E key

	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_E  , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_LWIN, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_E  , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	DoEvents
	Endproc

	Procedure ym16
	_Screen.WindowState=1
	Local m.myvar
	TEXT to m.myvar noshow
Windows Key+plus — zoom in using the Magnifier utility.
Windows Key+minus — zoom out using the Magnifier utility.
the magnifier is in taskbar-choose + or - to zoom on the window .
(can zoom 100% and up).
	ENDTEXT
	Messagebox(m.myvar,0+32+4096,"",3000)

	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer

	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1
	#Define VK_LWIN 0x5B  &&Left Windows key (Natural keyboard)
	#Define VK_OEM_PLUS  0xBB &&plus
	#Define VK_OEM_MINUS  0xBD &&minus

	keybd_event( VK_LWIN , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_OEM_PLUS    , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_LWIN  , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_OEM_PLUS   , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )

	DoEvents
	Endproc

	Procedure ym17
	Local m.myvar
	TEXT to m.myvar noshow
windows logo key Windows logo key+Enter  Open Narrator
click on zone to send to narrator (to read)
Important :Press Caps+Esc to Exit Narrator.
	ENDTEXT
	Messagebox(m.myvar,0+32+4096,"",3000)

	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer

	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1
	#Define VK_LWIN 0x5B  &&Left Windows key (Natural keyboard)
	#Define VK_RETURN 0x0D     &&ENTER key

	keybd_event( VK_LWIN , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_RETURN    , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_LWIN  , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_RETURN   , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	DoEvents
	Endproc

	Procedure ym18  &&share charm
	Local m.myvar
	TEXT to m.myvar noshow
windows logo key Windows +G  Open the share charm panel
	ENDTEXT
	Messagebox(m.myvar,0+32+4096,"",3000)

	Declare Integer keybd_event In Win32API ;
		INTEGER, Integer, Integer, Integer

	#Define KEYEVENTF_KEYUP 2
	#Define KEYEVENTF_EXTENDEDKEY 1
	#Define VK_LWIN 0x5B   &&Left Windows key (Natural keyboard)
	#Define VK_H   0X048   &&H key

	keybd_event( VK_LWIN  , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_H     , 0, KEYEVENTF_EXTENDEDKEY, 0 )
	keybd_event( VK_LWIN  , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	keybd_event( VK_H     , 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
	DoEvents

	Endproc

	Procedure ym19
	Local m.myvar
	TEXT to m.myvar noshow
Winkey + E 	Opens File Explorer
Winkey + G 	Activates the new Xbox game bar to let you record games or take screenshots.
Winkey + H 	Activates share feature in Windows 10 apps
Winkey + I
  Opens Windows 10 settings
Winkey + K 	Activates Connect feature to stream to wireless displays and audio devices
Winkey + L 	Locks a machine
Winkey + P 	Project a screen (if supported)
Winkey + R 	Run a command
Winkey + S
	Activates Cortana
Winkey + X 	Opens power user features
Winkey + Left / Right / Up / Down 	Snaps apps to the side of a screen (press Up or Down after snapping left / right to enable four apps to snap)
Winkey + Ctrl + D 	Creates a new virtual desktop
Winkey + Ctrl + F4 	Close virtual desktop
Winkey + Ctrl + Left or Right 	Switch between virtual desktops
Winkey + Shift + Left or Right 	Move apps from one monitor to another
Winkey + 1 / 2 / 3... 	Open programs that are pinned on the taskbar. The first app is number one.
	ENDTEXT
	Messagebox(m.myvar,0+32+4096,"Some Win10 Shorcuts")
	Endproc

	Procedure Destroy
	Clea Events
	Endproc
	Procedure command1.Click
	Define Popup raccourci SHORTCUT Relative From Mrow(),Mcol()
	Define Bar 1 Of raccourci Prompt "1.Win10 start menu" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 2 Of raccourci Prompt "2.win10 snapping window" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 3 Of raccourci Prompt "3.win10 tasks" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 4 Of raccourci Prompt "4.win10 virtual desktops" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 5 Of raccourci Prompt "5.win10 taskmanager" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 6 Of raccourci Prompt "6.win10 setting apps" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 7 Of raccourci Prompt "7.win10 run dialog" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 8 Of raccourci Prompt "8.win10 recent windows" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 9 Of raccourci Prompt "9.win10 navigates windows" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 10 Of raccourci Prompt "10.win10 CONTEXT_MENU_BUTTON" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 11 Of raccourci Prompt "11.win10  saved_screenshot" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 12 Of raccourci Prompt "12.win 10 MInMIZE_WINDOWS" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 13 Of raccourci Prompt "13.win10 actions_notifications" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 14 Of raccourci Prompt "14.win10 CORTANA" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 15 Of raccourci Prompt "15.win10 explorer" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 16 Of raccourci Prompt "16.win10 Magnifier" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 17 Of raccourci Prompt "17.Narrator(start/stop)" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 18 Of raccourci Prompt "18.Share charm panel" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR
	Define Bar 19 Of raccourci Prompt "19.Some win10 shortcuts" ;
		FONT "Courier New", 8 Style "BI"  Color G/W*, B/W*,,,,W+/GR


	On Selection Bar 1 Of raccourci 	_Screen.ActiveForm.ym1()

	On Selection Bar 2 Of raccourci 	_Screen.ActiveForm.ym2()

	On Selection Bar 3 Of raccourci 	_Screen.ActiveForm.ym3()

	On Selection Bar 4 Of raccourci 	_Screen.ActiveForm.ym4()

	On Selection Bar 5 Of raccourci 	_Screen.ActiveForm.ym5()

	On Selection Bar 6 Of raccourci 	_Screen.ActiveForm.ym6()

	On Selection Bar 7 Of raccourci 	_Screen.ActiveForm.ym7()

	On Selection Bar 8 Of raccourci 	_Screen.ActiveForm.ym8()

	On Selection Bar 9 Of raccourci 	_Screen.ActiveForm.ym9()

	On Selection Bar 10 Of raccourci	_Screen.ActiveForm.ym10()

	On Selection Bar 11 Of raccourci 	_Screen.ActiveForm.ym11()

	On Selection Bar 12 Of raccourci 	_Screen.ActiveForm.ym12()

	On Selection Bar 13 Of raccourci 	_Screen.ActiveForm.ym13()

	On Selection Bar 14 Of raccourci 	_Screen.ActiveForm.ym14()

	On Selection Bar 15 Of raccourci 	_Screen.ActiveForm.ym15()

	On Selection Bar 16 Of raccourci 	_Screen.ActiveForm.ym16()

	On Selection Bar 17 Of raccourci 	_Screen.ActiveForm.ym17()

	On Selection Bar 18 Of raccourci 	_Screen.ActiveForm.ym18()

	On Selection Bar 19 Of raccourci 	_Screen.ActiveForm.ym19()

	Activate Popup raccourci
	Endproc

Enddefine
*
*-- EndDefine: yshortcuts



Working with windows10 shortcuts
win10 introduces opacity setting 0-100% on cmd.exe (prompt window).it includes also a search dialog.(ctrl+f)
win10 introduces opacity setting 0-100% on cmd.exe (prompt window).it includes also a search dialog.(ctrl+f)

win10 introduces opacity setting 0-100% on cmd.exe (prompt window).it includes also a search dialog.(ctrl+f)

 
    *I repeat in code API declarations for permitting cutting code snippets only.(in principe 1 once in form.load)
*Important:*the code above is tested on visual foxpro 9 sp2-under windows 10 pro

To be informed of the latest articles, subscribe:
Comment on this post