c# - Why do Enter and Space keys behave differently for buttons? -


as far know, these keys react when button has focus.

pressing enter instantly 'clicks' button, if keep key down. (so 'click' happens on keydown).

pressing space acts more normal mouse click; holding down doesn't activate click event, once release it. (so 'click' happens on keyup or keypressed.)

why difference? i'd article on subject or logical explanation why 2 keys have different behavior. surely there's explanation out there!

i can't find articles explaining , it's question. think it's functionality purposes

enter key classic acceptbutton acts fullclick (click/clickreleased) that's why if hold have effect of clicking multiple times.

space singleclick (no click release until release key) can accomplish task click required without clickrelease , actions selection of control required activate it. checkbox or radiobuttons can't activate enter can activated space if click on it.

in conclusion, space official mouseclick since has same effects of mouseclick uppon pressing or releasing. enter sort of shortcut one click full click. all, of course, in idea of giving more possibilities keyboard itself.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -