Jump to content

Ignore OnKeyDown when Console Screen is up?

Recommended Posts

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 code

TheInput:AddKeyDownHandler(key, function()     if not GLOBAL.IsPaused() and not TheInput:IsKeyDown(GLOBAL.KEY_CTRL) and somesortofconsolecheck then          --Do Stuff     endend)
Link to comment
Share on other sites


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
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...