scancode_to_name(3alleg4)

scancode_to_name3alleg4

Converts a scancode to a key name. allegro game programming library.

Usage

#include <allegro.h>

const char *scancode_to_name(int scancode);

Overview

This function returns a string pointer containing the name of they key with the given scancode. This is useful if you e.g. let the user choose a key for some action, and want to display something more meaningful than just the scancode. Example:

   char const *keyname = scancode_to_name(scancode);
   allegro_message("You pressed the %s key.", keyname);

Releases

7 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7–10
  2. 11–13

From allegro4-doc 2:4.4.3.1-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.