Page 1 of 1

TAB Key

Posted: Sun Oct 09, 2011 7:45 pm
by djrikki
Switch msg.action
debugprint(msg.key)
Case "OnKeyDown"
if msg.key = "TAB"
; doesn't work
elseif msg.key = "\t"
; doesn't work
elseif msg.key = "\009"
; doesn't work
endif
EndSwitch

How do I detect the TAB key being preseed if neither of the 3 options above work? Also I'd like to do SHIFT+TAB as well.

Re: TAB Key

Posted: Sun Oct 09, 2011 9:47 pm
by PEB
The following code works for me:

Code: Select all

Switch msg.action
Case "OnKeyDown"
If msg.key = "        "; This needs to have 8 spaces
	If IsKeyDown("RSHIFT")=True Or IsKeyDown("LSHIFT")=True
		DebugPrint("SHIFT+TAB")
	Else
		DebugPrint("TAB")
	EndIf
EndIf
EndSwitch