AutoHotkey Community

It is currently May 27th, 2012, 6:15 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: capslock/shift problem
PostPosted: December 6th, 2005, 4:51 pm 
Before posting here, I searched for capslock and didn't see anything relevant. I want to turn off capslock when the shift key is pressed and by 'pressed' I mean as soon as the key is pressed in and not yet released.

The code I came up with:
Code:
Shift::SetCapslockState off
does not work in this manner. Capslock is turned off only after the shift key is released.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 6th, 2005, 6:02 pm 
ok, case closed. figured it out.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 6th, 2005, 7:26 pm 
Offline

Joined: November 28th, 2005, 4:34 pm
Posts: 10
Location: Michigan, USA
You should be generous and post your solution.

For anyone else that might need something similar to what lipsum asked for, you can use:

Code:
#Persistent
SetTimer, KeyTimer, 150
Return

KeyTimer:
KeyWait, Shift, D
SetCapsLockState, Off
Return


It's not the best of code, but it seems pretty reliable.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 6th, 2005, 7:50 pm 
My solution involves going to regional options -> input locales, setting shift key to turn off caps lock and running the following code:

Code:
Capslock::

if GetKeyState("Capslock","T") = 1
SetCapslockState off
else
SetCapslockState on

return


your solution seems to work just as well.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], HotkeyStick and 55 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group