Wired Keyboard

From GMod Wiki

Jump to: navigation, search
Wire Icon.png Wiremod ToolYarin Kaul Icon ArrowSquare32 left.png Back
Information 16x16.png Function:Almost full 101-key keyboard interface for use with WireMod
link=User:{{{author}}} Primary fire:Spawns a keyboard
Wrench orange.png Secondary fire:None
Link break.png Reload:No action
Page white text.png Notes:Hi-speed interface: Reading from cell 0 will return the number of keys queued in the buffer. The actual keys' ASCII codes can be read from cell 1 to 31. Writing to cell 0 (and possibly other cells?) will remove the first key from the buffer. Also, you can read cells 32 to 287 to see if a key is pressed right now. Eg: '0' has the ASCII code 48. We can read cell 80 (48+32) to get a 1 if 0 is currently pressed, or a 0 if it isn't currently pressed.

Brief

Keyboard that you can use to make your contraptions to be controlled with keypresses from keyboard.

Instructions

Press use (E) on the keyboard and type something, press Alt to get out of the mode. In this mode your input will be blocked till you press alt.

Inputs

None

Outputs

Output: Outputs the ASCII keycode of the currently pressed key.


Useful hints

Just spawn it, and you may wanna put some equal gates to check for button you want. For example, "0" is 48.

Example

Wire up the J input of a Stargate (J:Wire Keyboard Input) to a keyboard, and you can manually type Stargate addresses. Just hit Enter after you've typed it to activate.

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox