gregdwilson Posted June 6, 2015 Share Posted June 6, 2015 How do I make a check to see if the Console Screen is up so that I can ignore Key Handler Events? Here is the relevant codeTheInput:AddKeyDownHandler(key, function() if not GLOBAL.IsPaused() and not TheInput:IsKeyDown(GLOBAL.KEY_CTRL) and somesortofconsolecheck then --Do Stuff endend) Link to comment https://forums.kleientertainment.com/forums/topic/54911-ignore-onkeydown-when-console-screen-is-up/ Share on other sites More sharing options...
DarkXero Posted June 6, 2015 Share Posted June 6, 2015 GLOBAL.TheInput:IsDebugToggleEnabled()returns TRUE when the console is CLOSED.GLOBAL.ThePlayer.HUD:IsConsoleScreenOpen()returns TRUE when the console is OPEN. Link to comment https://forums.kleientertainment.com/forums/topic/54911-ignore-onkeydown-when-console-screen-is-up/#findComment-644557 Share on other sites More sharing options...
gregdwilson Posted June 6, 2015 Author Share Posted June 6, 2015 That was what I was looking for. Thanks! Link to comment https://forums.kleientertainment.com/forums/topic/54911-ignore-onkeydown-when-console-screen-is-up/#findComment-644558 Share on other sites More sharing options...
Seiai Posted June 6, 2015 Share Posted June 6, 2015 @gregdwilson,this is the whole check i use for my hotkeys:and not GLOBAL.IsPaused() and not GLOBAL.TheInput:IsKeyDown(GLOBAL.KEY_CTRL) and not GLOBAL.TheInput:IsKeyDown(GLOBAL.KEY_SHIFT) and not(TheSim:GetGameID()=="DST" and (player.HUD:IsChatInputScreenOpen() or player.HUD:IsConsoleScreenOpen())) Link to comment https://forums.kleientertainment.com/forums/topic/54911-ignore-onkeydown-when-console-screen-is-up/#findComment-644576 Share on other sites More sharing options...
gregdwilson Posted June 6, 2015 Author Share Posted June 6, 2015 Thanks @Seiai! That helps with Chatting as well which I needed. Link to comment https://forums.kleientertainment.com/forums/topic/54911-ignore-onkeydown-when-console-screen-is-up/#findComment-644587 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now