mmagnuski / eegDb

eegDb is an egglab plugin that eases up managing preprocessing routines. It allows to create project databases for reproducible eeg preprocessing with eeglab.
MIT License
3 stars 3 forks source link

KeyboardManager object for reacting to sequences of key presses #72

Closed mmagnuski closed 9 years ago

mmagnuski commented 9 years ago

Description

This PR refactors previous eegplot_readkey_new to be object-oriented, more convinient and elegant. It also adds an eval method to KeyboardManager and fastplot. This method allows to pass strings to KeyboardManager to be evaluated as if they were actual key presses. Because matlab's object oriented programming is slower than its default function-calling way I will have to test whether this does not slow fastplot significantly.

TODOs:

mmagnuski commented 9 years ago

speed is ok, seems to be a bit slower, but thats expected for a matlab object. I will investigate speed in the future to see I should add an option to choose between KeyboardManager and eegplot_readkey_new as keyboard event managers. But so far, so good - this is ready to be merged.