Enter and space key in UI's


(Calvin Krusen) #1

Regarding using the enter key to “click” a button on a UI…

It looks like some programmers take the time to make the enter key semi-dynamic. In the screen shots below (from Windows 7), the first shows the OK button is ind of highlighted (blue border) while the focus is on the “Start In” text box.

Hitting the enter key here (while focus is still in the text box) would be the same as clicking the OK button.

tabbing 3 times sets the focus on the “Open File Location” button(pict below). Note that the OK button loses the blue border, the "Open File… "button gains the blue boarder AND the dotted boarder that shows it’s in focus.

Hitting the enter key now, would do the same as the space key - it would be the same as clicking the “Open File Loc…” button.

[ gets down off of soap box ]


(Haso Keric) #2

Would be nice if you provided us a .gif :cowboy_hat_face:


(Calvin Krusen) #3


(Jose C Gomez) #4

So the way the “rules” work in Visual Studio anyways. You can tie the enter key to a specific button except when a different button has focus.


(Calvin Krusen) #5

What about non-button controls, like a checkbox?