This hook doesn't seem to exist anymore, are there any alternatives?
I need to hook where key presses and releases are being notified at so I can map the entire keyboard with shortcuts. So I can't just use BindPress or KeyPress because some keys I need don't use any IN_ enums or binds.
Click [URL="http://wiki.garrysmod.com/page/PANEL/OnKeyCodePressed"]here[/URL] for a lie.
And you sure your panel has Panel:SetKeyboardInputEnabled set to true?
Yep.
When I lua_find 'OnKeyCodePressed' nothing comes up.
[img]http://puu.sh/4T9k5/3112b52c92.png[/img]
[code]local a = vgui.Create("DFrame")
a:SetSize(300, 200)
a:MakePopup()
function a:OnKeyCodePressed( ... )
print( ... )
end[/code]
I did test it, and it works.
[editline]18th October 2013[/editline]
lua_find doesn't mean anything.
It started working after I called MakePopup() on it. I guess just SetVisible + RequestFocus wasn't enough.
Thanks.
Sorry, you need to Log In to post a reply to this thread.