Difference between revisions of "Keyboard PutKeycode"

From WikiPrizm
Jump to navigationJump to search
(Created page with "{{syscall | name = Keyboard_PutKeycode | header = fxcg/keyboard.h | index = 0x12C6 | signature = int Keyboard_PutKeycode(int x, int y, int keycode) | synopsis = Injects a key...")
 
Line 8: Line 8:
  
 
If '''x''' and '''y''' are equal or higher than zero, they will be treated as matrix codes and injected into different lower level key buffer(s),  used by lower-level keyboard reading syscalls, and '''keycode''' will be ignored.
 
If '''x''' and '''y''' are equal or higher than zero, they will be treated as matrix codes and injected into different lower level key buffer(s),  used by lower-level keyboard reading syscalls, and '''keycode''' will be ignored.
| comments = Injection of matrix codes only works when a keyboard reading method such as [[GetKey]] is already waiting, and so it has to be performed from a [[Timers|timer]] handler.
+
| comments = Injection of matrix codes only works when a keyboard reading method such as [[GetKey]] is already waiting, and so it has to be performed from a [[Timers|timer]] handler which must be started before GetKey is called.
 
}}
 
}}

Revision as of 12:10, 31 July 2014


Synopsis

Header: fxcg/keyboard.h
Syscall index: 0x12C6
Function signature: int Keyboard_PutKeycode(int x, int y, int keycode)

Injects a key code into a key buffer.

Parameters

If both x and y are below zero, keycode is injected into the GetKey buffer and its next call will return keycode. This works even on the "fx-CG10/20 Manager" emulator.

If x and y are equal or higher than zero, they will be treated as matrix codes and injected into different lower level key buffer(s), used by lower-level keyboard reading syscalls, and keycode will be ignored.

Comments

Injection of matrix codes only works when a keyboard reading method such as GetKey is already waiting, and so it has to be performed from a timer handler which must be started before GetKey is called.