sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
libkbd.c File Reference
#include <tamtypes.h>
#include <fcntl.h>
#include <unistd.h>
#include <ps2sdkapi.h>
#include <iopcontrol.h>
#include "libkbd.h"

Go to the source code of this file.

Functions

int PS2KbdInit (void)
int PS2KbdRead (char *key)
int PS2KbdReadRaw (PS2KbdRawKey *key)
int PS2KbdSetReadmode (u32 readmode)
int PS2KbdSetBlockingMode (u32 blockmode)
int PS2KbdSetRepeatRate (u32 repeat)
int PS2KbdSetLeds (u8 leds)
int PS2KbdSetKeymap (PS2KbdKeyMap *keymaps)
int PS2KbdSetCtrlmap (u8 *ctrlmap)
int PS2KbdSetAltmap (u8 *altmap)
int PS2KbdSetSpecialmap (u8 *special)
int PS2KbdFlushBuffer (void)
int PS2KbdResetKeymap (void)
int PS2KbdClose (void)

Detailed Description

USB Keyboard Driver for PS2

Definition in file libkbd.c.

Function Documentation

◆ PS2KbdClose()

int PS2KbdClose ( void )

Close down the keyboard library

Definition at line 164 of file libkbd.c.

◆ PS2KbdFlushBuffer()

int PS2KbdFlushBuffer ( void )

Flushes the keyboard buffer

Definition at line 142 of file libkbd.c.

◆ PS2KbdInit()

int PS2KbdInit ( void )

Initialise the keyboard library

Definition at line 27 of file libkbd.c.

◆ PS2KbdRead()

int PS2KbdRead ( char * key)

Reads 1 character from the keyboard

Definition at line 48 of file libkbd.c.

◆ PS2KbdReadRaw()

int PS2KbdReadRaw ( PS2KbdRawKey * key)

Reads 1 raw character from the keyboard

Definition at line 58 of file libkbd.c.

◆ PS2KbdResetKeymap()

int PS2KbdResetKeymap ( void )

Resets the keymap to the default US mapping

Definition at line 153 of file libkbd.c.

◆ PS2KbdSetAltmap()

int PS2KbdSetAltmap ( u8 * altmap)

Sets the alt key mappings

Definition at line 124 of file libkbd.c.

◆ PS2KbdSetBlockingMode()

int PS2KbdSetBlockingMode ( u32 readMode)

Sets the blocking mode on or off

Definition at line 78 of file libkbd.c.

◆ PS2KbdSetCtrlmap()

int PS2KbdSetCtrlmap ( u8 * ctrlmap)

Sets the control key mappings

Definition at line 115 of file libkbd.c.

◆ PS2KbdSetKeymap()

int PS2KbdSetKeymap ( PS2KbdKeyMap * keymaps)

Sets the current keymap

Definition at line 106 of file libkbd.c.

◆ PS2KbdSetLeds()

int PS2KbdSetLeds ( u8 leds)

Sets all connected keyboards leds

Definition at line 97 of file libkbd.c.

◆ PS2KbdSetReadmode()

int PS2KbdSetReadmode ( u32 readMode)

Sets the read mode to normal or raw

Definition at line 68 of file libkbd.c.

◆ PS2KbdSetRepeatRate()

int PS2KbdSetRepeatRate ( u32 repeat)

Sets the repeat rate in millseconds

Definition at line 88 of file libkbd.c.

◆ PS2KbdSetSpecialmap()

int PS2KbdSetSpecialmap ( u8 * special)

Sets the special key mappings

Definition at line 133 of file libkbd.c.