GLUTSPECIALFUNC(3)

πŸ“¦
version 3.8.0 Β· 2 versions
, in centos-stream 10, centos-stream 9, fedora 43, fedora 44, opensuse-leap 16.0

πŸ’– GLUTSPECIALFUNC(3) πŸ’–

okay bestie, welcome to the GLUTSPECIALFUNC(3) page, aka the manual for glutSpecialFunc πŸ’…

✨ NAME ✨

glutSpecialFunc β€” Sets the Special callback for the current window πŸŽ€

πŸ“š LIBRARY πŸ“š

OpenGLUT - input

🌸 SYNOPSIS 🌸

#include <openglut.h>

void
glutSpecialFunc(void( *callback )( int key, int x, int y ));

πŸ¦‹ PARAMETERS πŸ¦‹

  • callback β€” the client function that gets called on a keyboard event. yes queen, that's your glow-up function πŸ’–

πŸ‘‘ DESCRIPTION πŸ‘‘

so basically, this registers a callback that OpenGLUT is gonna call whenever the user hits one of the "special" keys on their keyboard. no cap. 🎹✨

The special callback handles a bunch of extra keys that are not covered by plain "keyboard" events. The key that gets passed into your callback is one of an enumerated set β€” and honestly the mapping to the actual keys on your keyboard is pretty obvious, it's giving common sense πŸ§ πŸ’…. Their GLUT symbol names are:

  • GLUT_KEY_F1
  • GLUT_KEY_F2
  • GLUT_KEY_F3
  • GLUT_KEY_F4
  • GLUT_KEY_F5
  • GLUT_KEY_F6
  • GLUT_KEY_F7
  • GLUT_KEY_F8
  • GLUT_KEY_F9
  • GLUT_KEY_F10
  • GLUT_KEY_F11
  • GLUT_KEY_F12
  • GLUT_KEY_LEFT
  • GLUT_KEY_UP
  • GLUT_KEY_RIGHT
  • GLUT_KEY_DOWN
  • GLUT_KEY_PAGE_UP
  • GLUT_KEY_PAGE_DOWN
  • GLUT_KEY_HOME
  • GLUT_KEY_END
  • GLUT_KEY_INSERT

want the other keys too? that's a whole different vibe, go see glutKeyboardFunc() 🫢

This callback is bound to the current window ⭐


πŸ’€ CAVEATS πŸ’€

lowkey important, so listen up fr fr:

  • So many keys are just not included here. like, they simply didn't make the list 😭
  • and it is not possible to apply qualifiers such as the Shift or Ctrl key to these keys. nope, no modifier glow-up for these ones πŸ™ˆ

also, windows created via glutCreateMenuWindow() always cascade keyboard and mouse events to their parent. always. periodt. πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯


okay that's the whole page, bestie, you ate that πŸ“πŸ’œ this was the UNDATED edition, brought to you by UNTITLED() β€” iconic behavior, no notes, slay βœ¨πŸŽ€