Jump to content

HotKey API

From fCraft Wiki
Revision as of 03:54, 9 July 2011 by F (talk | contribs) (Created page with " = Hotkey API = A simple way to get key press information from the client. ===KeyFlags enum=== Enumeration used to indicate what modifiers were on when the key was pressed or re...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Hotkey API

A simple way to get key press information from the client.

KeyFlags enum

Enumeration used to indicate what modifiers were on when the key was pressed or released.

[Flags] enum KeyFlags {
    None = 0,
    Ctrl = 1,
    Alt = 2,
    Shift = 4,
    CapsLock = 8
}

KeyPressed packet

  • byte OpCode
  • byte KeyIndex - OpenGL key enumeration
  • byte KeyFlags - see enumeration above

KeyReleased packet

  • byte OpCode
  • byte KeyIndex - OpenGL key enumeration
  • byte KeyFlags - see enumeration above