AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

caps is now delete and modifier key

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
ImonseI



Joined: 08 Oct 2004
Posts: 2

PostPosted: Fri Oct 08, 2004 3:34 pm    Post subject: caps is now delete and modifier key Reply with quote

just created my first useful script Smile
this will make caps lock function as backspace, but if you press backspace followed quickly by either "u" "i" "o" it will insert parantheses curlybrackets or double pling (forgot what they were called in english)
it does however have a dark side... if you are typing fast and want to erase a "uio" char it will replace. fidget with the timer to see what fits your speed.
Code:

#NoTrayIcon
#UseHook
timeout = 200
u::
if A_TimeSincePriorHotkey > %timeout%
{
   send, u
   return
}
else
if A_PriorHotkey = Capslock
{
   send, (){left}
   return
}
send, u
return

o::
if A_TimeSincePriorHotkey > %timeout%
{
   send, o
   return
}
else
if A_PriorHotkey = CapsLock
{
   send, {{}{}}{left}
   return
}
send, o
return

i::
if A_TimeSincePriorHotkey > %timeout%
{
   send, i
   return
}
else
if A_PriorHotkey = CapsLock
{
   send, {"}{"}{left}
   return
}
send, i
return

p::
if A_TimeSincePriorHotkey > %timeout%
{
   send, p
   return
}
else
if A_PriorHotkey = CapsLock
{
   send, {[}{]}{left}
   return
}
send, p
return

CapsLock::
if A_PriorHotkey = CapsLock
{
   send, {backspace}
   return
}
return
Back to top
View user's profile Send private message MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10464

PostPosted: Fri Oct 08, 2004 3:40 pm    Post subject: Reply with quote

Thanks for sharing that. I too enjoy using Capslock for usual purposes.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group