Skip to content

Commit f91826c

Browse files
committed
update readme
1 parent c186e4c commit f91826c

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,23 +130,27 @@ It is wrapper function to use `KbQueue` which is definitely what you should used
130130

131131
You can easily collect responses while running some other code at the same time.
132132

133-
It will only take responses from the `response box` which can simply be the "main keyboard" or
134-
another keyboard connected to the computer or the response box that the participant is using.
133+
It will only take responses from one device which can simply be the "main keyboard"
134+
(the default device that PTB will find) or another keyboard connected to the computer
135+
or the response box that the participant is using.
135136

136137
You can use it in a way so that it only takes responses from certain keys and ignore others (like
137138
the triggers from an MRI scanner).
138139

139140
If you want to know more on how to use it check its help section and the `CPP_getResponseDemo.m`.
140141

141-
To select a specific keyboard to be used by the experimenter or the participant, you need to know
142-
the value assigned by PTB to each keyboard device.
142+
In brief, there are several actions you can execute with this function.
143143

144-
To know this copy-paste this on the command window:
144+
- init: initialize the buffer for key presses on a given device (you can also specify the keys of interest that should be listened to).
145+
- start: start listening to the key presses (carefully insert into your script - where do you want to start buffering the responses).
146+
- check: till that point, it will check the buffer for all key presses.
147+
- It only reports presses on the keys of interest mentioned at initialization.
148+
- It **can** also check for presses on the escape key and abort if the escape key is part of the keys of interest.
149+
- flush: Empties the buffer of key presses in case you want to discard any previous key presses.
150+
- stop: Stops buffering key presses. You can still restart by calling "start" again.
151+
- release: Closes the buffer for good.
145152

146-
[keyboardNumbers, keyboardNames] = GetKeyboardIndices;
147153

148-
keyboardNumbers
149-
keyboardNames
150154

151155
### deg2Pix
152156

getResponse.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
%
4141
% responseEvents.duration = 0;
4242
%
43-
% responseEvents.key_name : the name of the key pressed
43+
% responseEvents.keyName : the name of the key pressed
4444
%
4545
% responseEvents(iEvent,1).pressed : if
4646
% pressed == 1 --> the key was pressed

0 commit comments

Comments
 (0)