Author Topic: Program or script to change ctrl and caps lock?  (Read 2268 times)

0 Members and 1 Guest are viewing this topic.

Offline Fragil1ty

  • Thread Starter
  • Posts: 551
  • Location: England
  • Abre los ojos.
Program or script to change ctrl and caps lock?
« on: Sun, 20 April 2014, 13:47:30 »
Hey guys,


I've gone ahead and ordered a new keyboard, the Razer Blackwidow tournament edition (stealth) /w the new orange key-switches.


And because I use a noppoo choc mini, I use the switch option which basically makes the caps lock the ctrl key and vice versa.


So I'm just wondering if there is a application or maybe a AHK script that does this?


Thanks.
你搞砸了

Offline Daniel Beardsmore

  • Posts: 1874
  • Location: Hertfordshire, England
  • RIP
    • Boring twaddle
Re: Program or script to change ctrl and caps lock?
« Reply #1 on: Sun, 20 April 2014, 17:51:30 »
You're running Windows Vista or higher, I presume?

AHK code is simply this:

Ctrl::CapsLock
CapsLock::Ctrl

(Key swapping in AHK in XP is defective. I can't speak for Vista but it works OK in 7 and 8.)

This won't work for ctrl+alt+delete, and it won't work inside any high integrity processes (including elevated processes) unless you use Task Scheduler to start the script on login with maximum privileges. It will also be ignored by any processes that read the keyboard directly or programs that override global hotkeys.

One solution is to reprogram the keys directly in the Registry.
Bore Awards
Most Boring Person on the Planet – 2011 Winner

Offline tuffy

  • Posts: 8
Re: Program or script to change ctrl and caps lock?
« Reply #2 on: Mon, 21 April 2014, 08:59:35 »
Microsoft has a ctrl/caps lock swapping program on their site:

http://technet.microsoft.com/en-us/sysinternals/bb897578.aspx

Mac OS X users can swap the two in the keyboard system preferences under "Modifier Keys..."

Linux users can swap them in the keyboard preferences under Gnome, or by using the xmodmap program.

Offline Skull_Angel

  • Posts: 453
Re: Program or script to change ctrl and caps lock?
« Reply #3 on: Mon, 21 April 2014, 09:53:13 »
If  you run Windows and are able to/don't have issue with modifying the registry;

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,1d,00,3a,00,3a,00,1d,00,00,00,00,00


Copy the above text to a word document, save the document and rename it from "whatever.txt" to "whatever.REG". When you run the file it will swap Ctrl with Caps Lock. If you want to change back to default simply go to the specified location in the windows registry editor [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] and remove "Scancode Map".

Had to do some digging to find this kind of stuff for myself, but I edited it so that my Caps Lock registered as Shift because I get a bit clumsy with my pinky when gaming (it also makes it easier to hit shift+5/6).
« Last Edit: Mon, 21 April 2014, 09:55:15 by Skull_Angel »

Offline tricheboars

  • * Esteemed Elder
  • Posts: 964
  • Location: Denver
  • Keyboards are Important!
Re: Program or script to change ctrl and caps lock?
« Reply #4 on: Mon, 21 April 2014, 10:46:49 »
its **** like this that keeps me using fully programmable hardware as my daily input.  **** everything about caps lock. what a waste of quality finger real estate.  it has no place on any of my boards. **** it isnt even programmed into another layer on my dox. i have and want nothing to do with caps. 
|  Fundamentalist ErgoDox Zealot  |  HHKB Hybrid

Offline Photekq

  • wheat flour zone
  • Posts: 4794
  • Location: North Wales, UK
  • sorry if i was ever an ******* to you
Re: Program or script to change ctrl and caps lock?
« Reply #5 on: Mon, 21 April 2014, 10:48:31 »
its **** like this that keeps me using fully programmable hardware as my daily input.  **** everything about caps lock. what a waste of quality finger real estate.  it has no place on any of my boards. **** it isnt even programmed into another layer on my dox. i have and want nothing to do with caps.
Some people still love caps.
https://kbdarchive.org/
github
discord: hi mum#5710

Offline tricheboars

  • * Esteemed Elder
  • Posts: 964
  • Location: Denver
  • Keyboards are Important!
Re: Program or script to change ctrl and caps lock?
« Reply #6 on: Mon, 21 April 2014, 10:51:24 »
its **** like this that keeps me using fully programmable hardware as my daily input.  **** everything about caps lock. what a waste of quality finger real estate.  it has no place on any of my boards. **** it isnt even programmed into another layer on my dox. i have and want nothing to do with caps.
Some people still love caps.

|  Fundamentalist ErgoDox Zealot  |  HHKB Hybrid

Offline Photekq

  • wheat flour zone
  • Posts: 4794
  • Location: North Wales, UK
  • sorry if i was ever an ******* to you
Re: Program or script to change ctrl and caps lock?
« Reply #7 on: Mon, 21 April 2014, 10:53:10 »
Show Image

Really... I use caps lock instead of shift for capital letters. I'm not kidding. I know other people do this aswell.
https://kbdarchive.org/
github
discord: hi mum#5710

Offline p3lim

  • Posts: 106
  • Location: Norway
Re: Program or script to change ctrl and caps lock?
« Reply #8 on: Mon, 21 April 2014, 11:09:54 »
SharpKeys is the tool to remap keys in windows, but since it changes them on a software level (registry), any software that polls hardware events ignores it (like games).

I use it myself to rebind caps to ctrl, tilde to escape and some other small things temporarily until I do a custom keyboard firmware.

Download here: http://www.randyrants.com/2011/12/sharpkeys_35.html
« Last Edit: Mon, 21 April 2014, 11:13:28 by p3lim »

Offline p3lim

  • Posts: 106
  • Location: Norway
Re: Program or script to change ctrl and caps lock?
« Reply #9 on: Mon, 21 April 2014, 11:12:17 »
Show Image

Really... I use caps lock instead of shift for capital letters. I'm not kidding. I know other people do this aswell.

If you're not doing something really special where you'd need to use uppercase combined with numbers a lot (software license keys come to mind), there is no real benefit to using caps over shift, especially for capitalizing.

Offline Photekq

  • wheat flour zone
  • Posts: 4794
  • Location: North Wales, UK
  • sorry if i was ever an ******* to you
Re: Program or script to change ctrl and caps lock?
« Reply #10 on: Mon, 21 April 2014, 11:17:56 »
If you're not doing something really special where you'd need to use uppercase combined with numbers a lot (software license keys come to mind), there is no real benefit to using caps over shift, especially for capitalizing.
There is not real disadvantage either. I just find caps lock more comfortable.
https://kbdarchive.org/
github
discord: hi mum#5710

Offline Frenir

  • HHKB Viking
  • Posts: 597
  • Location: Danmörk
Re: Program or script to change ctrl and caps lock?
« Reply #11 on: Mon, 21 April 2014, 11:18:38 »
Show Image

Really... I use caps lock instead of shift for capital letters. I'm not kidding. I know other people do this aswell.
Oh god, one of my classmates does this as well it makes me cringe every time I notice it.

Offline tricheboars

  • * Esteemed Elder
  • Posts: 964
  • Location: Denver
  • Keyboards are Important!
Re: Program or script to change ctrl and caps lock?
« Reply #12 on: Mon, 21 April 2014, 14:04:57 »
if i had a time machine i would go back to when IBM was designing the Model M keyboard and swap caps and control. then all of us would be happy.  except Photekq apparently, and his disgusting avatar. 

i am the hero we all deserve.
|  Fundamentalist ErgoDox Zealot  |  HHKB Hybrid

Offline Fragil1ty

  • Thread Starter
  • Posts: 551
  • Location: England
  • Abre los ojos.
Re: Program or script to change ctrl and caps lock?
« Reply #13 on: Thu, 24 April 2014, 04:58:29 »
Thanks everyone, this has been a major help and has suffered me from going insane, I don't even know how I managed to use the bottom left ctrl for so long and not switch to this layout sooner.
Thanks! :)
你搞砸了