Question

Here is what I am trying to accomplish:

  1. To Copy, press and release Caps Lock ONCE
  2. To Paste, press and release Caps Lock TWICE, quickly
  3. To Cut, press Ctrl+Caps Lock

The reason I want to do this is often times i find my self looking down to press the correct X/C/V key, since they're all next to each other (atleast on a QWERTY keyboard).

How can I do this on a standard keyboard (using Windows), so that it applies to the entire system and is transparent to all applications, including to Windows Explorer? If not possible with a standard keyboard, can any of the "programmable numeric keypads" do this you think?

In the above, by "transparent" I mean "the application should never know that this keystroke was translated. It only gets the regular Ctrl+X/C/V code, so it behaves without any problems".

Ps. Not sure of all the tags that are appropriate for this question, so feel free to add more tags.

SOLVED. UPDATE: Thank you to @Jonno_FTW for introducing me to AutoHotKey. I managed all three requirements by adding the following AHK script in the default AutoHotKey.ahk file in My Documents folder:

Ctrl & CapsLock::
  Send ^x
Return      
CapsLock::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 1000)
  Send ^v
Else
  Send ^c
Return

That was easy!

NOT COMPLETELY SOLVED. UPDATE: The above works in Notepad, but NOT in Explorer (copying files for example) or MS Office (even text copying does not work). So, I need to dig around a bit more into AutoHotKey or other solutions. Will post a solution here when I find one. In the meantime, if someone can make AutoHotKey work for everything I need, please reply!

ALL SOLVED. UPDATE: All I had to do was to change the capital "C"/X/Z to lowercase "c"/x/z. So Send ^C became Send ^c. It now works in ALL programs inlcuding Windows Explorer! Fixed code above to reflect this change.

Was it helpful?

Solution

I believe the program you are looking for is AutoHotkey.

OTHER TIPS

You need a Global Keyboard Hook.

Very nice! Been looking for something like this for a while.

My script is slightly different, making use of shift or control combinations for cut/copy, then CapsLock on its own is always paste.

Ctrl & CapsLock::
  Send ^x
Return

Shift & CapsLock::
  Send ^c
Return

CapsLock::
  Send ^v
Return

If you wanted to retain the option of retaining the Caps Lock function, I presume you could always remap e.g. Alt-CapsLock for this. I couldn't get it to toggle correctly when I tried it though.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top