1

I recently reinstalled the Windows on my Xiaomi Mi Notebook Air 13, resulting in a loss of its F7 function - so basically now the F7 key does nothing!

I have also found out that Windows currently has a really efficient way of creating a screenshot by using the Win+Shift+S shortcut, which copies to clipboard a selected region of the screen. My idea is to remap that F7 key to this functionality, but I have a problem!

I already tried writing VB script to execute this key combination, however, VB script's SendKeys doesn't support Windows key - so I guess this option is impossible. So I am thinking, does any of you knows exactly what Windows executes to run this feature? I am also opened to any other suggestions, as well!

P.S. I use WinHotKey for shortcut management.

1
  • 2
    What version of Windows are you using? Commented May 8, 2017 at 17:08

3 Answers 3

1

I've just remapped my PrintScreen button to Win+Shift+S using the Keyboard manager on Windows Power Toys.

https://github.com/microsoft/PowerToys

I've used AutoHotkey before and this would do the same job but Power Toys is simpler and quicker I'd say... WPT also has a lot of other nice functionality so it's worth checking out.

0

This article provides some useful ways of remapping keys, here are some useful tidbits from the article:

Sharpkeys:

SharpKeys is a program that’s brimming with features. It’s a keyboard remapper that offers an easy-to-use interface. All keyboard remaps are saved permanently, when using SharpKeys, since it adds values to the appropriate registries. A restart of the computer is required for keyboard changes to take effect.

Keymapper:

Thanks to its large keyboard graphic, Key Mapper is one of the easiest key remappers you can use. When using this tool, the keyboard graphic will take up most of your screen, making it easy to see.

As mentioned in the article, make a system restore point first, so you don't lose everything if something goes wrong.

Enjoy your keymapping!

Edit: The IBM website provides useful info on key mapping that should help you out.

Keyboard remapping lets you associate a sequence of keystrokes with a particular action, so that typing the sequence of keystrokes causes the action to occur. The sequence of keystrokes can be either a single key or a single key combined with Shift, Ctrl, or Alt. The action can be to display a character, to execute a host function, to execute a custom function, or to execute a menu command.

Autohotkey is a good resource as well, Apparently it can do multi-key combinations. According to this question, it can

[...] map key sequences, macros, mouse input, pretty much anything to a keypress or key combo.

And this question gives some more details and resources.

If you can't get it to do a full winkey+shift+s function, maybe have it do winkey+shift, and press "S" yourself?

4
  • Thanks for the fast reply! However, the problem is that I want to remap the key to a whole key combination - not an individual key. My idea was if you know a way to see what Windows runs when I press Win + Shift + S, and to run the same thing with a script, which I will then map to the F7 key P.S. I tried to mimic such functionality with keymapper, but couldn't do it :/ Commented May 8, 2017 at 19:43
  • @IvanPanchev Couldn't you just get it to run "Snipping tool"? Commented May 8, 2017 at 19:52
  • I can - that's easy - but what I particularly like is this way of taking screenshot without any additional UI - it's like opening Snipping tool and pressing new at once Commented May 8, 2017 at 21:51
  • @IvanPanchev Check out the edit I made, maybe that can help Commented May 9, 2017 at 5:49
0

You can do this by creating a keyboard macro which causes F7 to send Win + Shift + S.

One simple (though a little techie) way to do this is with the free tool AutoHotkey.

  1. Install Auto Hotkey

  2. Open Notepad, and enter put the text below, then save it in $Home\$Documents\AutoHotkey.ahk - This tells AutoHotkey to listen for F7 and whenever it is typed, to inject Win + Shift + S

F7::Send #S

Alternatively, if you want it to behave a bit more like the mac, and have Alt + Shift + 4 trigger the region screenshot, then put this in the file:

!$::Send #S

  1. run AutoHotkey.exe from C:\ProgramFiles\AutoHotkey\AutoHotkey.exe

If you want AutoHotkey every time you startup, run regedit, and add the registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run
New -> String Value
Name = AutoHotkey
Value = "C:\Program Files\AutoHotkey\AutoHotkey.exe"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .