Generic FunctionPackage: common-graphicsToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
Unrevised from 6.1

virtual-key-up

Arguments: window buttons key-code

This generic function is called when the user when the user releases a keyboard key. An application may add methods to this generic function to respond to keyboard events in its windows.

window is the window that had the keyboard focus when the event occurred. The keyboard focus is usually indicated by some sort of highlighting.

buttons works as in mouse-left-down, that is it is an integer indicating which mouse buttons and shift keys were down when the event occurred. The value is the result of applying logior to the values of the following bit-flag variables:

In addition, if the key that was pressed was one of several "extended keys" then the extended-key bit will be set. This is probably useful only when key-code is the value of vk-control or vk-alt and an application needs to know whether the righthand or lefthand version of this key was pressed. For these keys, the extended-key bit will be set for the righthand version only.

Other bits might be turned on as well, so functions such as logtest should be used to determine whether a particular mouse button or shift key was down; for example,

(logtest right-mouse-button buttons) 

will return true if and only if the right mouse button was down. For "down" events, the value includes the button or key being pressed now; for "up" events, the value does not include the button or key being released.

key-code is an integer representing the key that was released. If an alphanumeric character appears on the key, then key-code is the char-int of that character. Otherwise, key-code is the value of one of the character name constants beginning with "vk-". The value of the constant key-names is a list of all of the "vk-" character names.

See cg-events.htm for information about event handling in Common Graphics.


Copyright (c) 1998-2002, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 6.2. This page was not revised from the 6.1 page.
Created 2002.2.26.

ToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
Unrevised from 6.1