Home
The HyperCard Center
HyperTalk Reference
Home » HyperTalk Reference » arrowKey

Note: This is a work in progress and many formatting issues have been fixed. Read more about the project on the home page.

arrowKey

arrowKey direction

If the global property textArrows is false, the arrowKey command navigates through cards:

arrowKey left = go to previous card

arrowKey right = go to next card

arrowKey up = go forward through recent cards

arrowKey down = go backward through recent cards

If the global property textArrows is true, the arrowKey command navigates through cards unless the insertion point is in a field. Then arrowKey moves the insertion point within the field.

HyperCard sends the arrowKey command to the current card when an arrow key is pressed. The value passed to the parameter variable direction is left, right, up, or down, depending on which arrow key is pressed.

To handle the arrowKey message, use the following form:

on arrowKey whichKey
statements
end arrowKey

In the above form, the parameter variable whichKey is set to a direction.

Examples

-- Option + left and right arrow keys go to prev and next marked card
on arrowKey whichKey
if the optionKey is down then
if whichKey is "left" then
go previous marked card
else if whichKey is "right" then
go next marked card
end if
else pass arrowKey -- let the other arrowKey messages pass
end arrowKey

Related Topics

Placeholders

direction

One of the following:

down
left
right
up

In AppleScript, the four directions are represented by strings, not constants:

"down"
"left"
"right"
"up"

statements

Any return-separated list of built-in commands, user-defined handlers, or keywords that are part of a message or function handler.

put "Hello world" -- built-in command
get total(field 1) -- function call
global HelpInfo -- keyword

HyperTalk Reference

Version 0.8b4 (July 4, 2025)

Made with Macintosh

Switch to Retro View