Additions:
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychBasic/KbName.m">beta</a> | view WebSVN <a href=
"http://svn.berlios.de/wsvn/osxptb/trunk/Psychtoolbox/PsychBasic/KbName.m?op=log">changelog</a> of trunk branch</span>
Deletions:
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychBasic/KbName.m">beta</a> | view in <a href=
"http://svn.berlios.de/wsvn/osxptb/beta/Psychtoolbox/PsychBasic/KbName.m?view=markup">WebSVN with changelog</a></span>
Additions:
"http://svn.berlios.de/wsvn/osxptb/beta/Psychtoolbox/PsychBasic/KbName.m?view=markup">WebSVN with changelog</a></span>
Deletions:
"http://svn.berlios.de/viewcvs/osxptb/beta/Psychtoolbox/PsychBasic/KbName.m?view=markup">WebSVN with changelog</a></span>
Additions:
* If arg is a string designating a key label then KbName returns the
* If arg is a keycode, KbName returns the label of the designated key.
* If no argument is supplied then KbName waits one second and then
* If arg is 'UnifyKeyNames', KbName will switch its internal naming
* If arg is 'KeyNames', KbName will print out a table of all
* If arg is 'KeyNamesOSX', KbName will print out a table of all
* If arg is 'KeyNamesOS9', KbName will print out a table of all
* If arg is 'KeyNamesWindows', KbName will print out a table of all
* If arg is 'KeyNamesLinux', KbName will print out a table of all
Please note that KbName always assumes a US keyboard layout. Changing
the keyboard layout settings in your operating system will have no
effect. If a keyboard with non-US layout is connected, e.g, a german
keyboard layout, then certain keys may not match. E.g., on a german
keyboard, the 'Y' key will be reported as 'Z' key and the 'Z' key will
be reported as 'Y' key, because these two keys are interchanged on the
german keyboard wrt. the US keyboard.
Deletions:
� If arg is a string designating a key label then KbName returns the
� If arg is a keycode, KbName returns the label of the designated key.
� If no argument is supplied then KbName waits one second and then
� If arg is 'UnifyKeyNames', KbName will switch its internal naming
� If arg is 'KeyNames', KbName will print out a table of all
� If arg is 'KeyNamesOSX', KbName will print out a table of all
� If arg is 'KeyNamesOS9', KbName will print out a table of all
� If arg is 'KeyNamesWindows', KbName will print out a table of all
� If arg is 'KeyNamesLinux', KbName will print out a table of all
Additions:
� If arg is a string designating a key label then KbName returns the
� If arg is a keycode, KbName returns the label of the designated key.
� If no argument is supplied then KbName waits one second and then
� If arg is 'UnifyKeyNames', KbName will switch its internal naming
� If arg is 'KeyNames', KbName will print out a table of all
� If arg is 'KeyNamesOSX', KbName will print out a table of all
� If arg is 'KeyNamesOS9', KbName will print out a table of all
� If arg is 'KeyNamesWindows', KbName will print out a table of all
� If arg is 'KeyNamesLinux', KbName will print out a table of all
Deletions:
‚ If arg is a string designating a key label then KbName returns the
‚ If arg is a keycode, KbName returns the label of the designated key.
‚ If no argument is supplied then KbName waits one second and then
‚ If arg is 'UnifyKeyNames', KbName will switch its internal naming
‚ If arg is 'KeyNames', KbName will print out a table of all
‚ If arg is 'KeyNamesOSX', KbName will print out a table of all
‚ If arg is 'KeyNamesOS9', KbName will print out a table of all
‚ If arg is 'KeyNamesWindows', KbName will print out a table of all
‚ If arg is 'KeyNamesLinux', KbName will print out a table of all
Additions:
KbName maps between KbCheck-style keyscan codes and key names.
‚ If arg is a string designating a key label then KbName returns the
keycode of the indicated key.
‚ If arg is a keycode, KbName returns the label of the designated key.
‚ If no argument is supplied then KbName waits one second and then
‚ If arg is 'UnifyKeyNames', KbName will switch its internal naming
CAUTION: This function may contain bugs. Please report them (or fix
them) if you find some.
‚ If arg is 'KeyNames', KbName will print out a table of all
‚ If arg is 'KeyNamesOSX', KbName will print out a table of all
‚ If arg is 'KeyNamesOS9', KbName will print out a table of all
‚ If arg is 'KeyNamesWindows', KbName will print out a table of all
‚ If arg is 'KeyNamesLinux', KbName will print out a table of all
KbName deals with keys, not characters. See KbCheck help for an
explanation of keys, characters, and keycodes.
There are standard character sets, but there are no standard key
names. The convention KbName follows is to name keys with the primary
key label printed on the key. For example, the the "]}" key is named
"]" because "]" is the primary key label and "}" is the shifted key
function. In the case of labels such as "5", which appears on two
keys, the name "5" designates the "5" key on the numeric keypad and
"5%" designates the QWERTY "5" key. Here, "5" specifies the primary
label of the key and the shifted label, "%" refines the specification,
distinguishing it from keypad "5". Keys labeled with symbols not
represented in character sets are assigned names describing those
symbols or the key function, for example the space bar is named
"space" and the apple key is named "apple". Some keyboards have
identically-labelled keys distinguished
Use KbName to make your scripts more readable and portable, using key
labels instead of keycodes, which are cryptic and vary between Mac and
Windows computers.
For example,
yesKey = KbName('return');
[a,b,keyCode] = KbCheck;
if keyCode(yesKey)
flushevents('keyDown');
...
end;
OS X _ OS9 _ Windows __________________________________________________
See also KbCheck, KbDemo, KbWait.
""
<div class="code_header" style="text-align:right;">
<span style="float:left;">Path </span> <span class="counter">Retrieve current version of KbName.m from berliOS: <a href=
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychBasic/KbName.m">beta</a> | view in <a href=
"http://svn.berlios.de/viewcvs/osxptb/beta/Psychtoolbox/PsychBasic/KbName.m?view=markup">WebSVN with changelog</a></span>
</div>
<div class="code">
<code>Psychtoolbox/PsychBasic/KbName.m</code>
</div>
""
Deletions:
KbName maps between KbCheck-style keyscan codes and key names.
- If arg is a string designating a key label then KbName returns the
keycode of the indicated key.
- If arg is a keycode, KbName returns the label of the designated key.
- If no argument is supplied then KbName waits one second and then
- If arg is 'UnifyKeyNames', KbName will switch its internal naming
CAUTION: This function may contain bugs. Please report them (or fix
them) if you find some.
- If arg is 'KeyNames', KbName will print out a table of all
- If arg is 'KeyNamesOSX', KbName will print out a table of all
- If arg is 'KeyNamesOS9', KbName will print out a table of all
- If arg is 'KeyNamesWindows', KbName will print out a table of all
- If arg is 'KeyNamesLinux', KbName will print out a table of all
KbName deals with keys, not characters. See KbCheck help for an
explanation of keys, characters, and keycodes.
There are standard character sets, but there are no standard key
names. The convention KbName follows is to name keys with the primary
key label printed on the key. For example, the the "]}" key is named
"]" because "]" is the primary key label and "}" is the shifted key
function. In the case of labels such as "5", which appears on two
keys, the name "5" designates the "5" key on the numeric keypad and
"5%" designates the QWERTY "5" key. Here, "5" specifies the primary
label of the key and the shifted label, "%" refines the specification,
distinguishing it from keypad "5". Keys labeled with symbols not
represented in character sets are assigned names describing those
symbols or the key function, for example the space bar is named
"space" and the apple key is named "apple". Some keyboards have
identically-labelled keys distinguished
Use KbName to make your scripts more readable and portable, using key
labels instead of keycodes, which are cryptic and vary between Mac and
Windows computers.
For example,
yesKey = KbName('return');
[a,b,keyCode] = KbCheck;
if keyCode(yesKey)
flushevents('keyDown');
...
end;
=== OS X, OS9, Windows ===
See also KbCheck, KbDemo, KbWait.
%%(php;Path)Psychtoolbox/PsychBasic/KbName.m%%
Additions:
KbName maps between KbCheck-style keyscan codes and key names.
- If arg is a string designating a key label then KbName returns the
keycode of the indicated key.
- If arg is a keycode, KbName returns the label of the designated key.
- If no argument is supplied then KbName waits one second and then
- If arg is 'UnifyKeyNames', KbName will switch its internal naming
CAUTION: This function may contain bugs. Please report them (or fix
them) if you find some.
- If arg is 'KeyNames', KbName will print out a table of all
- If arg is 'KeyNamesOSX', KbName will print out a table of all
- If arg is 'KeyNamesOS9', KbName will print out a table of all
- If arg is 'KeyNamesWindows', KbName will print out a table of all
- If arg is 'KeyNamesLinux', KbName will print out a table of all
KbName deals with keys, not characters. See KbCheck help for an
explanation of keys, characters, and keycodes.
There are standard character sets, but there are no standard key
names. The convention KbName follows is to name keys with the primary
key label printed on the key. For example, the the "]}" key is named
"]" because "]" is the primary key label and "}" is the shifted key
function. In the case of labels such as "5", which appears on two
keys, the name "5" designates the "5" key on the numeric keypad and
"5%" designates the QWERTY "5" key. Here, "5" specifies the primary
label of the key and the shifted label, "%" refines the specification,
distinguishing it from keypad "5". Keys labeled with symbols not
represented in character sets are assigned names describing those
symbols or the key function, for example the space bar is named
"space" and the apple key is named "apple". Some keyboards have
identically-labelled keys distinguished
Use KbName to make your scripts more readable and portable, using key
labels instead of keycodes, which are cryptic and vary between Mac and
Windows computers.
For example,
yesKey = KbName('return');
[a,b,keyCode] = KbCheck;
if keyCode(yesKey)
flushevents('keyDown');
...
end;
=== OS X, OS9, Windows ===
See also KbCheck, KbDemo, KbWait.
%%(php;Path)Psychtoolbox/PsychBasic/KbName.m%%
Deletions:
KbName maps between KbCheck-style keyscan codes and key names.
‚ If arg is a string designating a key label then KbName returns the
keycode of the indicated key.
‚ If arg is a keycode, KbName returns the label of the designated key.
‚ If no argument is supplied then KbName waits one second and then
‚ If arg is 'UnifyKeyNames', KbName will switch its internal naming
CAUTION: This function may contain bugs. Please report them (or fix
them) if you find some.
‚ If arg is 'KeyNames', KbName will print out a table of all
‚ If arg is 'KeyNamesOSX', KbName will print out a table of all
‚ If arg is 'KeyNamesOS9', KbName will print out a table of all
‚ If arg is 'KeyNamesWindows', KbName will print out a table of all
‚ If arg is 'KeyNamesLinux', KbName will print out a table of all
KbName deals with keys, not characters. See KbCheck help for an
explanation of keys, characters, and keycodes.
There are standard character sets, but there are no standard key
names. The convention KbName follows is to name keys with the primary
key label printed on the key. For example, the the "]}" key is named
"]" because "]" is the primary key label and "}" is the shifted key
function. In the case of labels such as "5", which appears on two
keys, the name "5" designates the "5" key on the numeric keypad and
"5%" designates the QWERTY "5" key. Here, "5" specifies the primary
label of the key and the shifted label, "%" refines the specification,
distinguishing it from keypad "5". Keys labeled with symbols not
represented in character sets are assigned names describing those
symbols or the key function, for example the space bar is named
"space" and the apple key is named "apple". Some keyboards have
identically-labelled keys distinguished
Use KbName to make your scripts more readable and portable, using key
labels instead of keycodes, which are cryptic and vary between Mac and
Windows computers.
For example,
yesKey = KbName('return');
[a,b,keyCode] = KbCheck;
if keyCode(yesKey)
flushevents('keyDown');
...
end;
OS X _ OS9 _ Windows __________________________________________________
See also KbCheck, KbDemo, KbWait.
""
<div class="code_header" style="text-align:right;">
<span style="float:left;">Path </span> <span class="counter">Retrieve current version of KbName.m from berliOS: <a href=
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychBasic/KbName.m">beta</a> | view in <a href=
"http://svn.berlios.de/viewcvs/osxptb/beta/Psychtoolbox/PsychBasic/KbName.m?view=markup">WebSVN with changelog</a></span>
</div>
<div class="code">
<code>Psychtoolbox/PsychBasic/KbName.m</code>
</div>
""
Edited on
2008-09-25 18:08:38 by
DocBot [Reverting last edit by DocBot [7581] to previous version [7139]]
Additions:
KbName maps between KbCheck-style keyscan codes and key names.
‚ If arg is a string designating a key label then KbName returns the
keycode of the indicated key.
‚ If arg is a keycode, KbName returns the label of the designated key.
‚ If no argument is supplied then KbName waits one second and then
‚ If arg is 'UnifyKeyNames', KbName will switch its internal naming
CAUTION: This function may contain bugs. Please report them (or fix
them) if you find some.
‚ If arg is 'KeyNames', KbName will print out a table of all
‚ If arg is 'KeyNamesOSX', KbName will print out a table of all
‚ If arg is 'KeyNamesOS9', KbName will print out a table of all
‚ If arg is 'KeyNamesWindows', KbName will print out a table of all
‚ If arg is 'KeyNamesLinux', KbName will print out a table of all
KbName deals with keys, not characters. See KbCheck help for an
explanation of keys, characters, and keycodes.
There are standard character sets, but there are no standard key
names. The convention KbName follows is to name keys with the primary
key label printed on the key. For example, the the "]}" key is named
"]" because "]" is the primary key label and "}" is the shifted key
function. In the case of labels such as "5", which appears on two
keys, the name "5" designates the "5" key on the numeric keypad and
"5%" designates the QWERTY "5" key. Here, "5" specifies the primary
label of the key and the shifted label, "%" refines the specification,
distinguishing it from keypad "5". Keys labeled with symbols not
represented in character sets are assigned names describing those
symbols or the key function, for example the space bar is named
"space" and the apple key is named "apple". Some keyboards have
identically-labelled keys distinguished
Use KbName to make your scripts more readable and portable, using key
labels instead of keycodes, which are cryptic and vary between Mac and
Windows computers.
For example,
yesKey = KbName('return');
[a,b,keyCode] = KbCheck;
if keyCode(yesKey)
flushevents('keyDown');
...
end;
OS X _ OS9 _ Windows __________________________________________________
See also KbCheck, KbDemo, KbWait.
""
<div class="code_header" style="text-align:right;">
<span style="float:left;">Path </span> <span class="counter">Retrieve current version of KbName.m from berliOS: <a href=
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychBasic/KbName.m">beta</a> | view in <a href=
"http://svn.berlios.de/viewcvs/osxptb/beta/Psychtoolbox/PsychBasic/KbName.m?view=markup">WebSVN with changelog</a></span>
</div>
<div class="code">
<code>Psychtoolbox/PsychBasic/KbName.m</code>
</div>
""
Deletions:
KbName maps between KbCheck-style keyscan codes and key names.
- If arg is a string designating a key label then KbName returns the
keycode of the indicated key.
- If arg is a keycode, KbName returns the label of the designated key.
- If no argument is supplied then KbName waits one second and then
- If arg is 'UnifyKeyNames', KbName will switch its internal naming
CAUTION: This function may contain bugs. Please report them (or fix
them) if you find some.
- If arg is 'KeyNames', KbName will print out a table of all
- If arg is 'KeyNamesOSX', KbName will print out a table of all
- If arg is 'KeyNamesOS9', KbName will print out a table of all
- If arg is 'KeyNamesWindows', KbName will print out a table of all
- If arg is 'KeyNamesLinux', KbName will print out a table of all
KbName deals with keys, not characters. See KbCheck help for an
explanation of keys, characters, and keycodes.
There are standard character sets, but there are no standard key
names. The convention KbName follows is to name keys with the primary
key label printed on the key. For example, the the "]}" key is named
"]" because "]" is the primary key label and "}" is the shifted key
function. In the case of labels such as "5", which appears on two
keys, the name "5" designates the "5" key on the numeric keypad and
"5%" designates the QWERTY "5" key. Here, "5" specifies the primary
label of the key and the shifted label, "%" refines the specification,
distinguishing it from keypad "5". Keys labeled with symbols not
represented in character sets are assigned names describing those
symbols or the key function, for example the space bar is named
"space" and the apple key is named "apple". Some keyboards have
identically-labelled keys distinguished
Use KbName to make your scripts more readable and portable, using key
labels instead of keycodes, which are cryptic and vary between Mac and
Windows computers.
For example,
yesKey = KbName('return');
[a,b,keyCode] = KbCheck;
if keyCode(yesKey)
flushevents('keyDown');
...
end;
=== OS X, OS9, Windows ===
See also KbCheck, KbDemo, KbWait.
%%(php;Path)Psychtoolbox/PsychBasic/KbName.m%%
Edited on
2008-09-16 11:10:00 by
DocBot [Reverting last edit by DocBot [7581] to previous version [7139]]
Additions:
KbName maps between KbCheck-style keyscan codes and key names.
- If arg is a string designating a key label then KbName returns the
keycode of the indicated key.
- If arg is a keycode, KbName returns the label of the designated key.
- If no argument is supplied then KbName waits one second and then
- If arg is 'UnifyKeyNames', KbName will switch its internal naming
CAUTION: This function may contain bugs. Please report them (or fix
them) if you find some.
- If arg is 'KeyNames', KbName will print out a table of all
- If arg is 'KeyNamesOSX', KbName will print out a table of all
- If arg is 'KeyNamesOS9', KbName will print out a table of all
- If arg is 'KeyNamesWindows', KbName will print out a table of all
- If arg is 'KeyNamesLinux', KbName will print out a table of all
KbName deals with keys, not characters. See KbCheck help for an
explanation of keys, characters, and keycodes.
There are standard character sets, but there are no standard key
names. The convention KbName follows is to name keys with the primary
key label printed on the key. For example, the the "]}" key is named
"]" because "]" is the primary key label and "}" is the shifted key
function. In the case of labels such as "5", which appears on two
keys, the name "5" designates the "5" key on the numeric keypad and
"5%" designates the QWERTY "5" key. Here, "5" specifies the primary
label of the key and the shifted label, "%" refines the specification,
distinguishing it from keypad "5". Keys labeled with symbols not
represented in character sets are assigned names describing those
symbols or the key function, for example the space bar is named
"space" and the apple key is named "apple". Some keyboards have
identically-labelled keys distinguished
Use KbName to make your scripts more readable and portable, using key
labels instead of keycodes, which are cryptic and vary between Mac and
Windows computers.
For example,
yesKey = KbName('return');
[a,b,keyCode] = KbCheck;
if keyCode(yesKey)
flushevents('keyDown');
...
end;
=== OS X, OS9, Windows ===
See also KbCheck, KbDemo, KbWait.
Deletions:
KbName maps between KbCheck-style keyscan codes and key names.
‚ If arg is a string designating a key label then KbName returns the
keycode of the indicated key.
‚ If arg is a keycode, KbName returns the label of the designated key.
‚ If no argument is supplied then KbName waits one second and then
‚ If arg is 'UnifyKeyNames', KbName will switch its internal naming
CAUTION: This function may contain bugs. Please report them (or fix
them) if you find some.
‚ If arg is 'KeyNames', KbName will print out a table of all
‚ If arg is 'KeyNamesOSX', KbName will print out a table of all
‚ If arg is 'KeyNamesOS9', KbName will print out a table of all
‚ If arg is 'KeyNamesWindows', KbName will print out a table of all
‚ If arg is 'KeyNamesLinux', KbName will print out a table of all
KbName deals with keys, not characters. See KbCheck help for an
explanation of keys, characters, and keycodes.
There are standard character sets, but there are no standard key
names. The convention KbName follows is to name keys with the primary
key label printed on the key. For example, the the "]}" key is named
"]" because "]" is the primary key label and "}" is the shifted key
function. In the case of labels such as "5", which appears on two
keys, the name "5" designates the "5" key on the numeric keypad and
"5%" designates the QWERTY "5" key. Here, "5" specifies the primary
label of the key and the shifted label, "%" refines the specification,
distinguishing it from keypad "5". Keys labeled with symbols not
represented in character sets are assigned names describing those
symbols or the key function, for example the space bar is named
"space" and the apple key is named "apple". Some keyboards have
identically-labelled keys distinguished
Use KbName to make your scripts more readable and portable, using key
labels instead of keycodes, which are cryptic and vary between Mac and
Windows computers.
For example,
yesKey = KbName('return');
[a,b,keyCode] = KbCheck;
if keyCode(yesKey)
flushevents('keyDown');
...
end;
OS X _ OS9 _ Windows __________________________________________________
See also KbCheck, KbDemo, KbWait.
Edited on
2008-06-15 19:55:45 by
DocBot [Reverting last edit by DocBot [7581] to previous version [7139]]
Additions:
==[[Psychtoolbox]] › [[PsychBasic]]==
KbName maps between KbCheck-style keyscan codes and key names.
‚ If arg is a string designating a key label then KbName returns the
keycode of the indicated key.
‚ If arg is a keycode, KbName returns the label of the designated key.
‚ If no argument is supplied then KbName waits one second and then
‚ If arg is 'UnifyKeyNames', KbName will switch its internal naming
CAUTION: This function may contain bugs. Please report them (or fix
them) if you find some.
‚ If arg is 'KeyNames', KbName will print out a table of all
‚ If arg is 'KeyNamesOSX', KbName will print out a table of all
‚ If arg is 'KeyNamesOS9', KbName will print out a table of all
‚ If arg is 'KeyNamesWindows', KbName will print out a table of all
‚ If arg is 'KeyNamesLinux', KbName will print out a table of all
KbName deals with keys, not characters. See KbCheck help for an
explanation of keys, characters, and keycodes.
There are standard character sets, but there are no standard key
names. The convention KbName follows is to name keys with the primary
key label printed on the key. For example, the the "]}" key is named
"]" because "]" is the primary key label and "}" is the shifted key
function. In the case of labels such as "5", which appears on two
keys, the name "5" designates the "5" key on the numeric keypad and
"5%" designates the QWERTY "5" key. Here, "5" specifies the primary
label of the key and the shifted label, "%" refines the specification,
distinguishing it from keypad "5". Keys labeled with symbols not
represented in character sets are assigned names describing those
symbols or the key function, for example the space bar is named
"space" and the apple key is named "apple". Some keyboards have
identically-labelled keys distinguished
Use KbName to make your scripts more readable and portable, using key
labels instead of keycodes, which are cryptic and vary between Mac and
Windows computers.
For example,
yesKey = KbName('return');
[a,b,keyCode] = KbCheck;
if keyCode(yesKey)
flushevents('keyDown');
...
end;
OS X _ OS9 _ Windows __________________________________________________
See also KbCheck, KbDemo, KbWait.
Deletions:
==[[Psychtoolbox]] › PsychBasic==
KbName maps between KbCheck-style keyscan codes and key names.
- If arg is a string designating a key label then KbName returns the
keycode of the indicated key.
- If arg is a keycode, KbName returns the label of the designated key.
- If no argument is supplied then KbName waits one second and then
- If arg is 'UnifyKeyNames', KbName will switch its internal naming
CAUTION: This function may contain bugs. Please report them (or fix
them) if you find some.
- If arg is 'KeyNames', KbName will print out a table of all
- If arg is 'KeyNamesOSX', KbName will print out a table of all
- If arg is 'KeyNamesOS9', KbName will print out a table of all
- If arg is 'KeyNamesWindows', KbName will print out a table of all
- If arg is 'KeyNamesLinux', KbName will print out a table of all
KbName deals with keys, not characters. See KbCheck help for an
explanation of keys, characters, and keycodes.
There are standard character sets, but there are no standard key
names. The convention KbName follows is to name keys with the primary
key label printed on the key. For example, the the "]}" key is named
"]" because "]" is the primary key label and "}" is the shifted key
function. In the case of labels such as "5", which appears on two
keys, the name "5" designates the "5" key on the numeric keypad and
"5%" designates the QWERTY "5" key. Here, "5" specifies the primary
label of the key and the shifted label, "%" refines the specification,
distinguishing it from keypad "5". Keys labeled with symbols not
represented in character sets are assigned names describing those
symbols or the key function, for example the space bar is named
"space" and the apple key is named "apple". Some keyboards have
identically-labelled keys distinguished
Use KbName to make your scripts more readable and portable, using key
labels instead of keycodes, which are cryptic and vary between Mac and
Windows computers.
For example,
yesKey = KbName('return');
[a,b,keyCode] = KbCheck;
if keyCode(yesKey)
flushevents('keyDown');
...
end;
=== OS X, OS9, Windows ===
See also KbCheck, KbDemo, KbWait.
Edited on
2008-03-21 05:17:35 by
DocBot [Reverting last edit by DocBot [7581] to previous version [7139]]
Additions:
CAUTION: This function may contain bugs. Please report them (or fix
them) if you find some.
KbName deals with keys, not characters. See KbCheck help for an
explanation of keys, characters, and keycodes.
There are standard character sets, but there are no standard key
names. The convention KbName follows is to name keys with the primary
key label printed on the key. For example, the the "]}" key is named
"]" because "]" is the primary key label and "}" is the shifted key
function. In the case of labels such as "5", which appears on two
keys, the name "5" designates the "5" key on the numeric keypad and
"5%" designates the QWERTY "5" key. Here, "5" specifies the primary
label of the key and the shifted label, "%" refines the specification,
distinguishing it from keypad "5". Keys labeled with symbols not
represented in character sets are assigned names describing those
symbols or the key function, for example the space bar is named
"space" and the apple key is named "apple". Some keyboards have
identically-labelled keys distinguished
Use KbName to make your scripts more readable and portable, using key
labels instead of keycodes, which are cryptic and vary between Mac and
Windows computers.
For example,
yesKey = KbName('return');
[a,b,keyCode] = KbCheck;
if keyCode(yesKey)
flushevents('keyDown');
...
end;
See also KbCheck, KbDemo, KbWait.
Deletions:
CAUTION: This function may contain bugs. Please report them (or fix
them) if you find some.
KbName deals with keys, not characters. See KbCheck help for an
explanation of keys, characters, and keycodes.
There are standard character sets, but there are no standard key
names. The convention KbName follows is to name keys with the primary
key label printed on the key. For example, the the "]}" key is named
"]" because "]" is the primary key label and "}" is the shifted key
function. In the case of labels such as "5", which appears on two
keys, the name "5" designates the "5" key on the numeric keypad and
"5%" designates the QWERTY "5" key. Here, "5" specifies the primary
label of the key and the shifted label, "%" refines the specification,
distinguishing it from keypad "5". Keys labeled with symbols not
represented in character sets are assigned names describing those
symbols or the key function, for example the space bar is named
"space" and the apple key is named "apple". Some keyboards have
identically-labelled keys distinguished
Use KbName to make your scripts more readable and portable, using key
labels instead of keycodes, which are cryptic and vary between Mac and
Windows computers.
For example,
yesKey = KbName('return');
[a,b,keyCode] = KbCheck;
if keyCode(yesKey)
flushevents('keyDown');
...
end;
See also KbCheck, KbDemo, KbWait.
Edited on
2008-03-21 05:10:35 by
DocBot [Reverting last edit by DocBot [7581] to previous version [7139]]
Additions:
KbName maps between KbCheck-style keyscan codes and key names.
- If arg is a string designating a key label then KbName returns the
keycode of the indicated key.
- If arg is a keycode, KbName returns the label of the designated key.
- If no argument is supplied then KbName waits one second and then
Deletions:
KbName maps between KbCheck-style keyscan codes and key names.
If arg is a string designating a key label then KbName returns the
keycode of the indicated key.
- If arg is a keycode, KbName returns the label of the designated key.
- If no argument is supplied then KbName waits one second and then
Edited on
2008-03-21 05:08:59 by
DocBot [Reverting last edit by DocBot [7581] to previous version [7139]]
Additions:
=== OS X, OS9, Windows ===
Deletions:
OS X, OS9, Windows __________________________________________________
Edited on
2008-03-21 05:08:12 by
DocBot [Reverting last edit by DocBot [7581] to previous version [7139]]
Additions:
OS X, OS9, Windows __________________________________________________
Deletions:
OS X _ OS9 _ Windows __________________________________________________
Edited on
2008-03-21 05:07:03 by
DocBot [Reverting last edit by DocBot [7581] to previous version [7139]]
Additions:
- If arg is a keycode, KbName returns the label of the designated key.
- If no argument is supplied then KbName waits one second and then
- If arg is 'UnifyKeyNames', KbName will switch its internal naming
- If arg is 'KeyNames', KbName will print out a table of all
- If arg is 'KeyNamesOSX', KbName will print out a table of all
- If arg is 'KeyNamesOS9', KbName will print out a table of all
- If arg is 'KeyNamesWindows', KbName will print out a table of all
- If arg is 'KeyNamesLinux', KbName will print out a table of all
Deletions:
~- If arg is a keycode, KbName returns the label of the designated key.
~- If no argument is supplied then KbName waits one second and then
~- If arg is 'UnifyKeyNames', KbName will switch its internal naming
~- If arg is 'KeyNames', KbName will print out a table of all
~- If arg is 'KeyNamesOSX', KbName will print out a table of all
~- If arg is 'KeyNamesOS9', KbName will print out a table of all
~- If arg is 'KeyNamesWindows', KbName will print out a table of all
~- If arg is 'KeyNamesLinux', KbName will print out a table of all
Edited on
2008-03-21 03:34:52 by
DocBot [Reverting last edit by DocBot [7581] to previous version [7139]]
Additions:
==[[Psychtoolbox]] › PsychBasic==
If arg is a string designating a key label then KbName returns the
~- If arg is a keycode, KbName returns the label of the designated key.
~- If no argument is supplied then KbName waits one second and then
~- If arg is 'UnifyKeyNames', KbName will switch its internal naming
~- If arg is 'KeyNames', KbName will print out a table of all
~- If arg is 'KeyNamesOSX', KbName will print out a table of all
~- If arg is 'KeyNamesOS9', KbName will print out a table of all
~- If arg is 'KeyNamesWindows', KbName will print out a table of all
~- If arg is 'KeyNamesLinux', KbName will print out a table of all
----
%%(php;Path)Psychtoolbox/PsychBasic/KbName.m%%
Deletions:
==PtbReference › PsychBasic==
� If arg is a string designating a key label then KbName returns the
� If arg is a keycode, KbName returns the label of the designated key.
� If no argument is supplied then KbName waits one second and then
� If arg is 'UnifyKeyNames', KbName will switch its internal naming
� If arg is 'KeyNames', KbName will print out a table of all
� If arg is 'KeyNamesOSX', KbName will print out a table of all
� If arg is 'KeyNamesOS9', KbName will print out a table of all
� If arg is 'KeyNamesWindows', KbName will print out a table of all
� If arg is 'KeyNamesLinux', KbName will print out a table of all
_________________________________________________________________________
PsychBasic
Edited on
2008-03-15 12:08:04 by
DocBot [Reverting last edit by DocBot [7581] to previous version [7139]]
Additions:
===[[KbName]]===
==PtbReference › PsychBasic==
Deletions:
===PsychBasic===
The oldest known version of this page was created on
2008-03-15 10:26:07 by
DocBot [Reverting last edit by DocBot [7581] to previous version [7139]]