@@ -32,9 +32,9 @@ suppression of keyboard input to Matlab and unsuppressed mode.
3232
3333Please note that the commands [ ListenChar] ( ListenChar ) , [ CharAvail] ( CharAvail ) and [ GetChar] ( GetChar ) are
3434subject to various constraints and limitations, depending on the
35- operating system you use, if you use Matlab in Java or -nojvm mode, if
36- you use Octave, if you have [ Screen] ( Screen ) () onscreen windows open or not, or if
37- you use [ KbQueueXXX] ( KbQueueXXX ) functions in parallel or not. Therefore use of these
35+ operating system you use, if you use a Matlab with/without Java based GUI,
36+ or if you use Octave, if you have [ Screen] ( Screen ) () onscreen windows open or not, or
37+ if you use [ KbQueueXXX] ( KbQueueXXX ) functions in parallel or not. Therefore use of these
3838functions can be troublesome for any but the most simple usages. Use of
3939[ KbCheck] ( KbCheck ) , [ KbWait] ( KbWait ) , [ KbStroke] ( KbStroke ) /Press/[ ReleaseWait] ( ReleaseWait ) is often simpler if you are
4040just after keyboard input. Use of [ KbQueue] ( KbQueue ) functions, e.g., [ KbQueueCheck] ( KbQueueCheck ) ,
@@ -45,13 +45,13 @@ more flexible and subject to less restrictions and gotchas than use of
4545
4646### Some of the restrictions and caveats:
4747
48- 1 . Works very well with Matlab and its Java based GUI enabled on Linux (on
49- desktop GUI's other than KDE) and macOS, as well as on [ WindowsXP ] ( WindowsXP ) and earlier
50- versions of Windows .
48+ 1 . Works very well with Matlab releases older than R2025a and their Java
49+ based [ GUIs ] ( GUIs ) enabled on Linux (but only on desktop GUI's other than KDE),
50+ and on macOS .
5151
52- 2 . When used on Windows Vista or later (Vista, Windows-7, ..., Windows-10)
53- with Matlab's Java GUI, you cannot use any [ KbQueue] ( KbQueue ) functions at the same
54- time, ie., [ KbQueueCreate] ( KbQueueCreate ) /Start/Stop/Check/Wait as well as [ KbWaitTrigger] ( KbWaitTrigger ) ,
52+ 2 . When used on Microsoft Windows with old Matlab versions with Java GUI,
53+ you cannot use any [ KbQueue] ( KbQueue ) functions at the same time, ie.,
54+ [ KbQueueCreate] ( KbQueueCreate ) /Start/Stop/Check/Wait as well as [ KbWaitTrigger] ( KbWaitTrigger ) ,
5555[ KbEventFlush] ( KbEventFlush ) , [ KbEventAvail] ( KbEventAvail ) , and [ KbEventGet] ( KbEventGet ) are off limits after any call
5656to [ ListenChar] ( ListenChar ) , [ ListenChar] ( ListenChar ) (1), [ ListenChar] ( ListenChar ) (2), [ FlushEvents] ( FlushEvents ) , [ CharAvail] ( CharAvail ) or
5757[ GetChar] ( GetChar ) . You would need to call [ ListenChar] ( ListenChar ) (0) before you could call
@@ -61,21 +61,22 @@ to [ListenChar](ListenChar), [ListenChar](ListenChar)(1), [ListenChar](ListenCha
6161use them again. Use of other devices, e.g., mouse or joystick, is not
6262prohibited during use of [ GetChar] ( GetChar ) et al.
6363
64- 3 . If you use Matlab in "matlab -nojvm" mode without its GUI, or if you
65- use GNU/Octave instead of Matlab, the same restrictions as in 2. apply -
64+ 3 . If you use Matlab in "matlab -nojvm" or "matlab -nodesktop" mode without
65+ its GUI, or if you use a Matlab of version R2025a or later, or you use
66+ GNU/Octave instead of Matlab, the same restrictions as in 2. apply -
6667no parallel use of the default keyboards [ KbQueue] ( KbQueue ) . [ KbQueues] ( KbQueues ) can be used
67- for other input devices and on Linux and OSX for keyboards other than the
68+ for other input devices and on Linux and macOS for keyboards other than the
6869default keyboard.
6970
7071The only feature that works in parallel with [ KbQueues] ( KbQueues ) on the default keyboard
7172is the suppression of spilling of keystroke characters into the Matlab or
72- Octave window during [ ListenChar] ( ListenChar ) (2) - at least on Linux and OSX. On
73- Windows this can't be prevented at all in "matlab -nojvm" mode. However,
74- if you switch to [ ListenChar ] ( ListenChar ) (2) mode, you cannot break out of it by
75- pressing CTRL+C on Linux if the keyboard queue that is in parallel use
76- didn't get [ KbQueueStart ] ( KbQueueStart ) called, ie. if it is stopped. On OSX with a
77- stopped Keyboard queue, neither CTRL+C nor stopping a runaway script
78- works.
73+ Octave window during [ ListenChar] ( ListenChar ) (2) - at least on Linux and macOS with old
74+ Matlab versions before R2025a and their Java based [ GUIs ] ( GUIs ) . On Windows this
75+ can't be prevented at all in "matlab -nojvm" mode. However, if you switch
76+ to [ ListenChar ] ( ListenChar ) (2) mode, you cannot break out of it by pressing CTRL+C on
77+ Linux if the keyboard queue that is in parallel use didn't get
78+ [ KbQueueStart ] ( KbQueueStart ) called, ie. if it is stopped. On macOS with a stopped
79+ Keyboard queue, neither CTRL+C nor stopping a runaway script works.
7980
80814 . On Linux, as a exception, some [ GetChar] ( GetChar ) , [ CharAvail] ( CharAvail ) functionality may
8182still work in case 3. under certain conditions, e.g., if you don't use
@@ -95,7 +96,7 @@ Basically: Mixing [GetChar](GetChar) et al. and modern [KbQueue](KbQueue) functi
9596not advisable, or if needed, great care must be taken to sidestep all the
9697mentioned limitations. Also the [ KbQueue] ( KbQueue ) functions usually have better
9798timing precision and allow to flexibly address multiple keyboards
98- separately at least on Linux and OSX .
99+ separately at least on Linux and macOS .
99100
100101
101102For further explanation see help for "[ GetChar] ( GetChar ) ".
0 commit comments