How to Send and ignore CapsLock ? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
dsewq1LYJ
Posts: 116
Joined: 26 Aug 2014, 23:21

How to Send and ignore CapsLock ?

24 Sep 2016, 11:51

My code is like this

Code: Select all

If GetKeyState("CapsLock","T") {
	SetCapsLockState Off
	CLRevert:=1
}
Send % Clipboard
If (CLRevert)
	SetCapsLockState On
I cant use CTRL + V here for some ... reason ...
So ... is possible make it easier in AHK_L !?
Shadowpheonix
Posts: 1259
Joined: 16 Apr 2015, 09:41

Re: How to Send and ignore CapsLock ?

26 Sep 2016, 11:03

SendInput is generally faster than Send.
If you want any further suggestions, please provide more details on what you are looking for.
dsewq1LYJ
Posts: 116
Joined: 26 Aug 2014, 23:21

Re: How to Send and ignore CapsLock ?

30 Sep 2016, 07:50

Shadowpheonix wrote:SendInput is generally faster than Send.
If you want any further suggestions, please provide more details on what you are looking for.
In Command prompt I can not using Ctrl+V (In default CMD)
So the point is possible make "Send" always output as what I needed.

Send foobar ;~ Lowercase

Send FOOBAR ;~ Uppercase

Send fooBAR ;~ foo is Lowercase and BAR is Uppercase

Hope you understood what I meant


E.g.

In Node.js shell

I can use Send process.version to retrive the version of the current node.js

but when my CapsLock is ON --- If GetKeyState("CapsLock","T")

then the command sent "PREOCESS.VERSION" instead of "process.version"...and the shell of node.js is CaseSensitive, it'll just throw back "ReferenceError"
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: How to Send and ignore CapsLock ?  Topic is solved

30 Sep 2016, 08:42

Send should take case of this by itself. The key history of Send test while CapsLock is on is:

Code: Select all

14  03A	i	d	0.50	CapsLock       	
14  03A	i	u	0.00	CapsLock       	
54  014	i	d	0.00	t              	
54  014	i	u	0.02	t              	
45  012	i	d	0.03	e              	
45  012	i	u	0.01	e              	
53  01F	i	d	0.03	s              	
53  01F	i	u	0.01	s              	
54  014	i	d	0.03	t              	
54  014	i	u	0.02	t              	
14  03A	i	d	0.03	CapsLock       	
14  03A	i	u	0.00	CapsLock       	
It turns CapsLock off and on by itself. So you need to figure out why it doesn't for you. Are you using the most recent AHK version (not that I think it was ever any different), are you running multiple scripts, are you using other keyboard driver/software?
dsewq1LYJ
Posts: 116
Joined: 26 Aug 2014, 23:21

Re: How to Send and ignore CapsLock ?

01 Oct 2016, 04:28

Nextron wrote:Send should take case of this by itself. The key history of Send test while CapsLock is on is:

Code: Select all

14  03A	i	d	0.50	CapsLock       	
14  03A	i	u	0.00	CapsLock       	
54  014	i	d	0.00	t              	
54  014	i	u	0.02	t              	
45  012	i	d	0.03	e              	
45  012	i	u	0.01	e              	
53  01F	i	d	0.03	s              	
53  01F	i	u	0.01	s              	
54  014	i	d	0.03	t              	
54  014	i	u	0.02	t              	
14  03A	i	d	0.03	CapsLock       	
14  03A	i	u	0.00	CapsLock       	
It turns CapsLock off and on by itself. So you need to figure out why it doesn't for you. Are you using the most recent AHK version (not that I think it was ever any different), are you running multiple scripts, are you using other keyboard driver/software?
Oh my god ... you really help me out...

When you says Send should toggle the CapsLock by itself by "default"...

I did realized there's a command called "SetStoreCapslockMode Off" in my Script...

and I did just commented it and problem solved :D OMG ! :dance:

Thank you so so much ^_^

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], mikeyww, peter_ahk and 340 guests