• How to use Function keys :D
    3 replies, posted
So i have a menu and i want to bring up the menu by pressing f1 or f2, or any function key really ( but not F10 ;) ) i can bring up my menu through console using this though [code]concommand.Add( "Open_Menu", Menu )[/code]
[b][url=wiki.garrysmod.com/?title=Gamemode.ShowHelp]Gamemode.ShowHelp [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] [b][url=wiki.garrysmod.com/?title=Gamemode.ShowSpare1]Gamemode.ShowSpare1 [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] [b][url=wiki.garrysmod.com/?title=Gamemode.ShowSpare2]Gamemode.ShowSpare2 [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] These are called when keys F1-F3 are pressed me thinks.
alright that worked, thanks alot :D
Doubt it's any use to you, but you can also have most/all function keys. But for the sake of being simple, use what ralle posted, it's much easier to deal with. [lua] KEY_F1 KEY_F2 KEY_F3 KEY_F4 KEY_F5 KEY_F6 KEY_F7 KEY_F8 KEY_F9 KEY_F10 KEY_F11 KEY_F12 [/lua] Commonly, only F1-F4 is used. With the links ralle sent you. Check wiki for usage for the keys I posted as KeyPress only allows IN_ keys.
Sorry, you need to Log In to post a reply to this thread.