4.6 UI Change what 'Spacebar' is doing by default

Hi. So I’m making a game-speed clock for a strategy game (think like Xcom or Empire At War) with 4 buttons on it, and I’m using the new Unity 4.6 UI system with 4 buttons. Each one adjusts the timescale of the game to 0, 1, 10, and 100. See below:


Clicking the buttons works fine, but the EventSystem (I think, but I don’t adequately understand it) seems to do what it likes with the spacebar; namely, it will ‘click’ the last button that I mouse-clicked on.
I want to use the spacebar to always alternate between hitting the Pause button and the X1 button, but I can’t. To get around this for now I’ve set the ‘left ctrl’ (“Dodge” in my input controls, see script below) button to activate these buttons, but I really want to just stop the spacebar doing its own thing so I can use it myself.
Any ideas? Here’s the script I’m using but I want to get rid of “Dodge” and use “Jump”(default spacebar button).

			paused = !paused;

			else if(!paused)

Note that hitting “Dodge” button calls a function ‘void AdjustTimeScale(float timeScale)’. Clicking the UI buttons calls the same function with their respective timeScale floats. Hitting “Dodge” does NOT activate a button click directly, though I’ve no objection to doing that if the solution requires it. I’m just not sure how to make the key translate to a button click so I made the key go straight to the function.


PS I removed all the “jump” (spacebar) inputs from the Input controls but this had no effect.

Go to Edit → Project Settings → Input.

In the inspector drop down to submit.

Remove space from the alt positive button.

See BoredMormon’s answer. It’s this option (see image) that uses whatever project input settings define for “submit” key. In this case, (alt) key is space bar.


The event system adds another input to Unity inputs that does the default “click” on the currently focused control. I believe it is the default keyboard input module that defines which key does this. Both components should be under the automatically created EventSystem game object.