Is 'Ctrl' key pressed while clicking a button?

后端 未结 2 1150
粉色の甜心
粉色の甜心 2021-02-20 14:46

I need to know whether the user is holding down the ctrl key while clicking a button. Since it\'s a button and not a figure I cannot use \'selectionType\' on the figu

2条回答
  •  既然无缘
    2021-02-20 15:22

    Pressing the escape key reinitializes CurrentModifier. My solution so far has been to instruct my users (right in the GUI) to press the escape key to revert to default behavior.

    Overall, Matlab's CurrentModifier behavior seems to be that the modifier key "sticks" until one of the following occurs: a different modifier is pressed, a different window is selected, or the escape key is pressed.

提交回复
热议问题