remove_keyboard(3)

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

πŸ’… remove_keyboard(3)

okay so bestie, we're in the Allegro manual today and this one is short but lowkey important. buckle up πŸŽ€


✨ NAME ✨

remove_keyboard β€” Removes the Allegro keyboard handler. bye bye keyboard vibes πŸ‘‹βŒ¨οΈ


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro.h>

void remove_keyboard();

🌸 DESCRIPTION 🌸

So what does it do? It removes the keyboard handler, handing control right back to the operating system. that's it. that's the whole job. iconic minimalism πŸ’…

ngl, you don't normally need to bother calling this, because allegro_exit() will do it for you. she's got your back, fr fr. 🫢

But β€” and this is the part that matters β€” you might want to call this during runtime if you want to change the keyboard mapping on those platforms where keyboard mappings are needed. the way that requires a lil two-step dance:

  1. first you modify the configuration variable holding the keyboard mapping
  2. then you reinstall the keyboard handler

no cap. here's the example straight from the source:

remove_keyboard();
/* Switch to Spanish keyboard mapping. */
set_config_string("system", "keyboard", "es");
install_keyboard();

see? out with the old handler, swap the config, back in with the new one. main character energy ✨


πŸ‘€ SEE ALSO πŸ‘€


πŸ’– reminder bestie: this is Allegro version 4.4.3 energy β€” go forth and remap those keyboards, you absolute legend πŸ‘‘

mwah πŸ’‹ stay slaying, keyboard handler 🌈⭐

πŸ“¦ where this page comes from