Ps2KeyboardHost  1.0.1
Allows you to read from one or more PS2-style keyboards on an Arduino.
ps2_KeyboardLeds.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2017 Steve Benz <s8878992@hotmail.com>
3 
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8 
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13 
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
17 USA
18 */
19 #pragma once
20 
21 namespace ps2 {
23  enum class KeyboardLeds {
24  // the legends tell of a 4th LED that some keyboards have
25  capsLock = 0x4,
26  numLock = 0x2,
27  scrollLock = 0x1,
28 
29  all = 0x7,
30  none = 0x0,
31  };
33  {
34  return static_cast<KeyboardLeds>(static_cast<int>(a) | static_cast<int>(b));
35  }
36 }
KeyboardLeds operator|(KeyboardLeds a, KeyboardLeds b)
Definition: ps2_KeyboardLeds.h:32
Definition: ps2_AnsiTranslator.h:24
KeyboardLeds
The LED&#39;s available on a standard PS2 keyboard.
Definition: ps2_KeyboardLeds.h:23