Educational materials

MATLAB Example - Keystroke Detection

Note: MATLAB R2007A or greater is required to run the code

Annotations

Raw Source

% Test code for keystrokes

% Initialize window is necessary
initializeWindow(0);


KeepGoing = true;

while KeepGoing == true
    
    if checkKeyPress('g')
        disp('g');
    end
    
    if checkKeyPress('b')
        disp('b');
    end
    
    if checkKeyPress('q')
        KeepGoing = false;
    end
    
    pause(0.01);
end
r1 - 28 Nov 2007 - 19:05:37 - AaronStriegel
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Syndicate this site RSSATOM