Go to the documentation of this file.
45 #include "debug/PS2.hh"
47 #include "params/PS2Keyboard.hh"
55 p->vnc->setKeyboard(
this);
79 DPRINTF(PS2,
"Got keyboard read ID command.\n");
84 DPRINTF(PS2,
"Enabling the keyboard.\n");
89 DPRINTF(PS2,
"Disabling the keyboard.\n");
94 DPRINTF(PS2,
"Disabling and resetting the keyboard.\n");
99 DPRINTF(PS2,
"Resetting keyboard.\n");
105 panic(
"Keyboard resend unimplemented.\n");
108 if (
data.size() == 1) {
109 DPRINTF(PS2,
"Got LED write command.\n");
114 "caps lock %s, num lock %s, scroll lock %s\n",
122 panic(
"Keyboard diagnostic echo unimplemented.\n");
124 panic(
"Accessing alternate scan codes unimplemented.\n");
126 if (
data.size() == 1) {
127 DPRINTF(PS2,
"Setting typematic info.\n");
131 DPRINTF(PS2,
"Setting typematic info to %#02x.\n",
data[1]);
136 panic(
"Setting all keys to typemantic unimplemented.\n");
138 panic(
"Setting all keys to make/release unimplemented.\n");
140 panic(
"Setting all keys to make unimplemented.\n");
142 panic(
"Setting all keys to "
143 "typematic/make/release unimplemented.\n");
145 panic(
"Setting a key to typematic unimplemented.\n");
147 panic(
"Setting a key to make/release unimplemented.\n");
149 panic(
"Setting key to make only unimplemented.\n");
151 panic(
"Unknown keyboard command %#02x.\n",
data[0]);
171 for (uint8_t
c :
keys)
177 PS2KeyboardParams::create()
void send(const uint8_t *data, size_t size)
Send data from a PS/2 device to a host.
#define UNSERIALIZE_SCALAR(scalar)
PS2Keyboard(const PS2KeyboardParams *p)
void sendAck()
Send an ACK byte to the host.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
@ AllKeysToTypematicMakeRelease
void keySymToPs2(uint32_t key, bool down, bool &cur_shift, std::list< uint8_t > &keys)
bool shiftDown
is the shift key currently down
const std::vector< uint8_t > ID
#define SERIALIZE_SCALAR(scalar)
void serialize(CheckpointOut &cp) const override
Serialize an object.
void serialize(CheckpointOut &cp) const override
Serialize an object.
void keyPress(uint32_t key, bool down) override
Called when the vnc server receives a key press event from the client.
std::ostream CheckpointOut
bool recv(const std::vector< uint8_t > &data) override
Data received from host.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
bool enabled
Is the device enabled?
#define panic(...)
This implements a cprintf based panic() function.
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
bool bool std::list< uint8_t > & keys
Generated on Wed Sep 30 2020 14:02:11 for gem5 by doxygen 1.8.17