The Pedigree Project  0.1
kernel/machine/ppc_common/Keyboard.h
1 /*
2  * Copyright (c) 2008-2014, Pedigree Developers
3  *
4  * Please see the CONTRIB file in the root of the source tree for a full
5  * list of contributors.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef MACHINE_MALTA_KEYBOARD_H
21 #define MACHINE_MALTA_KEYBOARD_H
22 
23 #include "pedigree/kernel/machine/Keyboard.h"
24 #include "pedigree/kernel/machine/openfirmware/Device.h"
25 #include "pedigree/kernel/machine/openfirmware/OpenFirmware.h"
26 
27 class PPCKeyboard : public Keyboard
28 {
29  public:
30  PPCKeyboard();
31  virtual ~PPCKeyboard();
32 
36  virtual void initialise();
37 
38  virtual void setDebugState(bool enableDebugMode);
39  virtual bool getDebugState()
40  {
41  return true;
42  }
43 
49  virtual char getChar();
50 
57  virtual char getCharNonBlock();
58 
64  virtual Character getCharacter();
65 
72  virtual Character getCharacterNonBlock();
73 
77  virtual bool shift()
78  {
79  return false;
80  }
81 
85  virtual bool ctrl()
86  {
87  return false;
88  }
89 
93  virtual bool alt()
94  {
95  return false;
96  }
97 
101  virtual bool capsLock()
102  {
103  return false;
104  }
105 
106  private:
107  PPCKeyboard(const PPCKeyboard &);
108  PPCKeyboard &operator=(const PPCKeyboard &);
109 
111  OFHandle m_Dev;
112 };
113 
114 #endif
virtual char getChar()
virtual char getCharNonBlock()
virtual Character getCharacterNonBlock()
virtual void initialise()
virtual void setDebugState(bool enableDebugMode)
virtual Character getCharacter()