How to modify windows 10 Keyboard shortcuts?

46

14

As a Linux user, I'm a heavy workspace user. Windows 10 has that, but I would still like to switch between them the way I do in Linux, where I use ctrl+alt+right or left to switch between workspaces.

However, for Windows 10 it's rather ctrl+windows+right or left.

How do I modify these Windows 10 shortcuts to those of Linux?

answerSeeker

Posted 2015-10-17T01:29:09.230

Reputation: 991

It seems that the "Microsoft Mouse and Keyboard Center" could be used for that need. Unfortunately, one have to use a Microsoft keyboard to use this software. – Christophe Drevet-Droguet – 2019-05-13T07:44:22.850

Answers

14

I tried harrymc's script but it didn't work. So I modified it and the following one worked for me:

!^Right::send, #^{Right down}{Right up}
!^Left::send, #^{Left down}{Left up}

everything else was fine.

Then I improved the script by adding the following lines

!^Down::
    send, #^{Right down}{Right up}
    Sleep, 200
    send, #^{Right down}{Right up}
    return
!^Up::
    send, #^{Left down}{Left up}
    Sleep, 200
    send, #^{Left down}{Left up}
    return

This allows to emulate a 2x2 grid with UP and Down arrows to navigate between rows.

Edit: The sleep command was added to allow the animation to finish before sending the second send otherwise I have seen some occurrences where this second instruction was ignored.

Aquadarius

Posted 2015-10-17T01:29:09.230

Reputation: 256

1Is there a reason you need to Sleep, 200? Removing that prevents that 200ms flash of the desktops between where you jump to. Is removing the sleep a problem if you're CPU is running high? – Matt – 2017-03-20T14:07:50.190

1I had to add the sleep command because of the delay of the animation. In other words, before adding it, I have seen many occurrences where the second send was ignored because it is executed too fast. You may modify the sleep duration or remove it if you want. – Aquadarius – 2017-03-21T12:05:37.360

2Ahh. You can also remove it completely if you turn off "Animate windows when minimizing and maximizing" (win+x > system > advanced system settings > performance settings). – Matt – 2017-03-21T12:23:44.243

40

One cannot change the Windows shortcuts, but one can intercept keys and change them on the fly.

AutoHotkey is a great program for remapping keyboard keys. Here are the steps to set this up:

  1. Download and install AutoHotkey
  2. Create a text file named startup.ahk and paste the following inside to map Ctrl+Alt+Right / Left to Ctrl+Win+Right / Left:

!^Right::^#Right
!^Left::^#Left

  1. Save and run the script to test its functionality.
  2. If it performs as expected, copy the script into the Startup folder

To find the startup folder in Windows 10, open "Run" (press Win + R, or search for it in the Start menu) and type either (without quotes): "shell:startup" for the current user, or "shell:common startup" for all users. Copy startup.ahk to the folder that opens.

harrymc

Posted 2015-10-17T01:29:09.230

Reputation: 306 093

1I was thinking that I’d have to write my own script for this. Good thing someone already did it so that I wouldn't have to reinvent the wheel! – answerSeeker – 2015-10-24T17:47:15.067

7It still baffles me Windows doesn't add features to change keyboard shortcuts. 20 years later even. Wow. Amen to AutoHotkey. – Ligemer – 2017-05-26T01:48:35.007

Do you have to restart your computer after that in order for it to work? – Red M – 2018-01-12T21:48:05.233

@RedM: startup.ahk should already be running after testing. For future boots it will startup during the boot. – harrymc – 2018-01-12T22:18:08.703