Page 1 of 1

[20 Jul 2006] Special Keys for input

Posted: Sat Jun 13, 2020 5:31 pm
by GMKai
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 20 Jul 2006 17:52:01 +0200

Hello, I am currently trying to get a configurable InputSystem for a free choice of what key represents what action.

I know that e.g. the arrow-keys represented by "LEFT", "RIGHT" and so on. This works great as single letters as "a", "b"... do too. But others like "TAB", "SHIFT" fail miserably.

To check the pressed key I use InstallEventHandler({ OnKeyDown = p_UserFunction})

Within that function I filter for msg.key and compare it to some variables to check what the user wants to do.

Why aren't keys like TAB and SHIFT working?

[22 Jul 2006] Re: Special Keys for input

Posted: Sat Jun 13, 2020 5:31 pm
by airsoftsoftwair
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 22 Jul 2006 11:42:27 +0200
Hello, I am currently trying to get a configurable InputSystem for a free choice of what key represents what action.

I know that e.g. the arrow-keys represented by "LEFT", "RIGHT" and so on. This works great as single letters as "a", "b"... do too. But others like "TAB", "SHIFT" fail miserably.

To check the pressed key I use InstallEventHandler({ OnKeyDown = p_UserFunction})

Within that function I filter for msg.key and compare it to some variables to check what the user wants to do.

Why aren't keys like TAB and SHIFT working?
Support for these keys is not implemented yet. I'm trying to do that for the next version.

[20 Feb 2007] Re: Special Keys for input

Posted: Sat Jun 13, 2020 5:31 pm
by airsoftsoftwair
Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 20 Feb 2007 14:32:26 +0100

I have to correct myself here:

TAB is indeed working in Hollywood 2.0. It's passed as a string of eight space characters to the user function in msg.key, e.g.

Code: Select all

Function p_UserFunc(msg)
      If msg.key = "        " Then DebugPrint("TAB")
EndFunction

InstallEventHandler({OnKeyDown = p_UserFunc})