keyboard.hh (12654:749de33b7af6) keyboard.hh (12656:335489e574f3)
1/*
2 * Copyright (c) 2017-2018 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 60 unchanged lines hidden (view full) ---

69 AllKeysToMake = 0xF9,
70 AllKeysToTypematicMakeRelease = 0xFA,
71 KeyToTypematic = 0xFB,
72 KeyToMakeRelease = 0xFC,
73 KeyToMakeOnly = 0xFD,
74 Resend = 0xFE,
75 Reset = 0xFF
76 };
1/*
2 * Copyright (c) 2017-2018 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 60 unchanged lines hidden (view full) ---

69 AllKeysToMake = 0xF9,
70 AllKeysToTypematicMakeRelease = 0xFA,
71 KeyToTypematic = 0xFB,
72 KeyToMakeRelease = 0xFC,
73 KeyToMakeOnly = 0xFD,
74 Resend = 0xFE,
75 Reset = 0xFF
76 };
77 static const uint16_t NoCommand = (uint16_t)(-1);
78
79
77
78
80 uint16_t lastCommand;
81
82 /** is the shift key currently down */
83 bool shiftDown;
84
85 /** Is the device enabled? */
86 bool enabled;
87
88 public:
89 PS2Keyboard(const PS2KeyboardParams *p);
90
91 void serialize(CheckpointOut &cp) const override;
92 void unserialize(CheckpointIn &cp) override;
93
94 protected: // PS2Device
79 /** is the shift key currently down */
80 bool shiftDown;
81
82 /** Is the device enabled? */
83 bool enabled;
84
85 public:
86 PS2Keyboard(const PS2KeyboardParams *p);
87
88 void serialize(CheckpointOut &cp) const override;
89 void unserialize(CheckpointIn &cp) override;
90
91 protected: // PS2Device
95 void recv(uint8_t data) override;
92 bool recv(const std::vector<uint8_t> &data) override;
96
97 public: // VncKeyboard
98 void keyPress(uint32_t key, bool down) override;
99};
100
101#endif // __DEV_PS2_KEYBOARD_hH__
102
93
94 public: // VncKeyboard
95 void keyPress(uint32_t key, bool down) override;
96};
97
98#endif // __DEV_PS2_KEYBOARD_hH__
99