From: Uwe Kotyczka on 28 May 2010 10:37 Using MATLAB 7 I am looking for an equivalent to the WinAPI GetKeyState function. I have a GUI window, i.e. a figure with some buttons and some other controls on it. In the callback function of one button I want to do some additional stuff under some circumstances. However this option should not be obvious - just for those users who know about it. My idea is to do the additional stuff only if the button is double clicked or if the CTRL key is held down when the button is pressed or something similar. In case of programming Windows API I would use GetKeyState in the message handler. So now I am looking for something similar in MATLAB. Trapping a double click seem to impossible in the button's callback function since the callback is started by the first mouse event, so >> get(gcf,'selectiontype') always return 'normal'. My next Idea is to evaluate the key state of the CTRL key in the button's callback function. Is that possible in MATLAB?
|
Pages: 1 Prev: Statistics in Matlab from excel worksheet Next: Heading Control |