this can increase your typing speed. please help because ahk is not working as intend

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
parth1
Posts: 21
Joined: 28 Aug 2021, 11:55

this can increase your typing speed. please help because ahk is not working as intend

Post by parth1 » 01 Oct 2022, 23:07

if you find solution then i will give you money

i want to combine rshift with full stop(.)
{.} pressed and released full stop without any key press then send {.}
{.} pressed , then press {a} , then {.} released ( here {a} is pressed ) so {.} will be not send and after pressing ------ before releasing full stop
shift is down so (shift +a = A ) sended


i developed two way of doing it but both of them has own bug

in first method i used (Hotkey, % "~*" GetKeyName(Format("vk{:x}",A_Index-1)), c)

in this method i am not able to send full stop followed by space because space is considered as key press example :- i want to type { my name is gdoc. i am 21 y old } so while fast typing , i press space while {.} is down so it will result in { my name is gdoc i am 21 y old } because space is considered as key pres

tired to set key list manually so i can remove space as detection like

(Hotkey,%chr("F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","Backspace","LButton","RButton","Escape","Tab","Delete","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadDot","NumpadDiv","NumpadMult","NumpadAdd","NumpadSub","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","1","2","3","4","5","6","7","8","9","0",";","'",",",".","/","\","[","]","-","=","{","}","+","_","!","@","#","$","%","^","&","*","(",")","<",">","?","``","~","|") , c

but then ahk say it too much input for function

reference viewtopic.php?t=37921

Code: Select all

$.::
sending := true
Send,  {RShift Down}
while, GetKeyState(".","P")
Hotkey, % "~*" GetKeyName(Format("vk{:x}",A_Index-1)), f
Send, {RShift Up}
	if (sending)
	send, .
return


f:
sending := false
if GetKeyState(".","P")
return
else
Reload

in second way ( input) some time it send {.} after keypress like H.ow

Code: Select all

$.::
sending := true
Send , {RShift Down}
Loop 6 {
Input, key, V M T.05, %end_keys%
if (key = "")
   {
       if GetKeyState(".","P")
	      continue
	   else
         {
		   Send , {RShift Up}
		   if (sending)
		   send, .
	       break
         }

    }
else
	sending := false
}
return

teadrinker
Posts: 4325
Joined: 29 Mar 2015, 09:41
Contact:

Re: this can increase your typing speed. please help because ahk is not working as intend

Post by teadrinker » 02 Oct 2022, 02:05

Try this:

Code: Select all

Hook := InputHook("I")
Hook.KeyOpt("{All}", "N")
Hook.OnKeyDown := Func("OnKeyDown")
Return

$.::
   Hook.Start()
   KeyWait, .
   Hook.Stop()
   if (Hook.Input = "")
      Send .
   if (Hook.Input = " ")
      SendInput .%A_Space%
   Return

OnKeyDown(Hook, vk, sc) {
   if (vk != 0x20)
      SendInput % "+{" . Format("vk{:x}sc{:x}", vk, sc) . "}"
}

Post Reply

Return to “Ask for Help (v1)”