d_keyboard_proc(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

✨ NAME ✨

d_keyboard_proc β€” invisible dialog procedure for implementing keyboard shortcuts. It's part of the Allegro game programming library, and this page is from the Allegro manual, bestie: d_keyboard_proc(3). 🫢


πŸ“š SYNOPSIS πŸ“š

#include <allegro.h>

int d_keyboard_proc(int msg, DIALOG *d, int c);

πŸ’– DESCRIPTION πŸ’–

okay so this is an invisible object for implementing keyboard shortcuts. periodt. ✨

You can put an ASCII code in the key field of the dialog object β€” a character such as 'a' to respond to a simple keypress, or a number 1-26 to respond to a control key a-z. πŸ‘‘

Or you can put a keyboard scancode in the d1 and/or d2 fields. πŸ’…

When one of these keys is pressed, the object will call the function pointed to by dp. That function should return an int, and that int will be passed back to the dialog manager, so it can return D_O_K, D_REDRAW, D_CLOSE, etc. πŸ”₯


πŸ‘€ SEE ALSO πŸ‘€


source: Allegro Β· version: 4.4.3 Β· page: d_keyboard_proc(3) β€” mwah, bye bestie! πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from