Press -hold Shift

Discussion of Inner Space

Moderators: Lavish Software Team, Moderators

Post Reply
hegvape
GamingTools Subscriber
Posts: 30
Joined: Tue May 02, 2006 4:28 am

Press -hold Shift

Post by hegvape » Sat Mar 31, 2007 2:32 am

Hi

I am having an issue with the Press command and Shift.
When I do a 'Press -hold shift' in the Uplink Console it actually does that, presses and hold shift for me.
Doing the same thing in the Console doesn't press the Shift for me.
I have tried removing my swedish layout and replaced it with English (US), without any results.

Any idea what this can be? :?

Kindly

Val

hegvape
GamingTools Subscriber
Posts: 30
Joined: Tue May 02, 2006 4:28 am

Post by hegvape » Sat Mar 31, 2007 2:48 am

I noticed that the Uplink Console is using the 'Uplink Keyboard Driver' while the Console uses 'Virtual' (echo ${Keyboard.System}

hegvape
GamingTools Subscriber
Posts: 30
Joined: Tue May 02, 2006 4:28 am

Post by hegvape » Sat Mar 31, 2007 5:49 am

I have been searching the wiki but without finding anything to help me out, below is my piece of code that I am trying to use in the Login Screen for EQ2. I have tried both Press and Type, same results, it will only send/type in lower case.

Kindly

Val

Code: Select all

variable int PwdChar

function main(string StationPwd)
{
	PwdChar:Set[1]
	if ${StationPwd.Length}
	{
		do
		{
			; Check if letter is in Upper case then press Shift and hold while pressing the right char!
			; use GetAt[] to read the byte of the string.
			; bytes 65-90 Upper case, Press Shift
			; bytes 97-122 Lower case, Make sure Shift is released
				
			echo -----------
			echo No     : ${PwdChar}
			echo Letter : ${StationPwd.Mid[${PwdChar},1]}
			echo Byte   : ${StationPwd.GetAt[${PwdChar}]}

			if $&#123;StationPwd.GetAt[$&#123;PwdChar&#125;]&#125; >=65 && $&#123;StationPwd.GetAt[$&#123;PwdChar&#125;]&#125; <=90
			&#123;
				press -hold Shift
				;press $&#123;StationPwd.Mid[$&#123;PwdChar&#125;,1]&#125;
				Keyboard&#58;Type[$&#123;StationPwd.Mid[$&#123;PwdChar&#125;,1]&#125;]
			&#125;
			else
			&#123;
				press -release Shift
				;press $&#123;StationPwd.Mid[$&#123;PwdChar&#125;,1]&#125;
				Keyboard&#58;Type[$&#123;StationPwd.Mid[$&#123;PwdChar&#125;,1]&#125;]
			&#125;
			waitframe
		&#125;
		while $&#123;StationPwd.Length&#125; >= $&#123;PwdChar&#58;Inc&#125;
		press Enter
	&#125;
&#125;

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Sun Apr 01, 2007 8:46 pm

The emulation of keystrokes depends on how the host app is designed, so press -hold shift might work in one game, but not in others. The uplink's keyboard driver should pretty much always correctly emulate keypresses. The virtual keyboard driver is the one that would have problems. Note that these "drivers" are not windows drivers for your hardware, but an emulation layer for the IS kernel. But anyway, that's why it would differ between the uplink and a game, and why it also differs between games.

At any rate, this problem should be solved as of the next IS build.

hegvape
GamingTools Subscriber
Posts: 30
Joined: Tue May 02, 2006 4:28 am

Post by hegvape » Mon Apr 09, 2007 4:00 am

Works fine now, actually I dont use the shift key, instead I only use

Code: Select all

Keyboard&#58;Type[$&#123;StationPwd.Mid[$&#123;PwdChar&#125;,1]&#125;]
Thanks much

Post Reply