.\" Generated by the Allegro makedoc utility .TH key_shifts 3alleg4 "version 4.4.2" "Allegro" "Allegro manual" .SH NAME key_shifts \- Bitmask containing the current state of modifier keys. Allegro game programming library.\& .SH SYNOPSIS .B #include .sp .B extern volatile int key_shifts; .SH DESCRIPTION Bitmask containing the current state of shift/ctrl/alt, the special Windows keys, and the accent escape characters. Wherever possible this value will be updated asynchronously, but if keyboard_needs_poll() returns TRUE, you must manually call poll_keyboard() to update it with the current input state. This can contain any of the flags: .nf KB_SHIFT_FLAG KB_CTRL_FLAG KB_ALT_FLAG KB_LWIN_FLAG KB_RWIN_FLAG KB_MENU_FLAG KB_COMMAND_FLAG KB_SCROLOCK_FLAG KB_NUMLOCK_FLAG KB_CAPSLOCK_FLAG KB_INALTSEQ_FLAG KB_ACCENT1_FLAG KB_ACCENT2_FLAG KB_ACCENT3_FLAG KB_ACCENT4_FLAG .fi Example: .nf if (key[KEY_W]) { if (key_shifts & KB_SHIFT_FLAG) { /* User is pressing shift + W. */ } else { /* Hmmm... lower case W then. */ } } .fi .SH SEE ALSO .BR install_keyboard (3alleg4), .BR poll_keyboard (3alleg4), .BR key (3alleg4), .BR excamera (3alleg4), .BR exkeys (3alleg4)