FV_InputHandler (input keypress reader, native)

Discussions about Coding and Scripting
Post Reply
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

FV_InputHandler (input keypress reader, native)

Post by Higor »

Since it's no mutator or mod, I'll be putting this here.

Spawn it, let it find the transient Input object and register it, then start calling IsKeyPressed( int KeyIndex) on it to check whether this key is being pressed or not.
It also works for mouse buttons, and checks will return false if you're typing in the console.

http://dl.dropbox.com/u/58384316/UT99/F ... andler.zip

Source code is included, compiles on Visual C++ 6 with the original public headers.
Feel free to use it or adapt it to any compiler. (As a matter of fact, I'd like to see a linux version of it :agree1: )

The functionality could be further extended by hooking into c++ Tick and check for registered Keys and their Corresponding functions (all set on UnrealScript) on key press (not hold), but that's beyond my skill.

Edit:
Attaching to the forums as well.
Attachments
FV_InputHandler.zip
(15.01 KiB) Downloaded 140 times
User avatar
The_Cowboy
Skilled
Posts: 165
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: FV_InputHandler (input keypress reader, native)

Post by The_Cowboy »

Thanks a ton for this. I was looking for this kind of stuff. :gj:
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu:
Patreon: https://www.patreon.com/FreeandOpen
Post Reply