cmil::Keyboard Class Reference

This is a base keyboard device. More...

#include <InputDevice.h>

Inheritance diagram for cmil::Keyboard:

Inheritance graph
[legend]
Collaboration diagram for cmil::Keyboard:

Collaboration graph
[legend]
List of all members.

Public Member Functions

std::string getName () const
 Get the name of the device.
 Keyboard (const std::string &name)
 These build the base InputIndentifiers for this device.
 Keyboard ()
virtual InputDeviceclone () const
bool operator== (const Keyboard &keyboard) const

Private Member Functions

void init_inputs ()
 This is for ctor use only.

Detailed Description

This is a base keyboard device.

Definition at line 262 of file InputDevice.h.


Constructor & Destructor Documentation

cmil::Keyboard::Keyboard ( const std::string &  name  ) 

These build the base InputIndentifiers for this device.

Definition at line 635 of file InputDevice.cpp.

References init_inputs(), and Logger::log_debug().

00635                                            : InputDevice(name) {
00636      log_debug("Keyboard constructing");
00637      init_inputs();
00638    };

Here is the call graph for this function:

cmil::Keyboard::Keyboard (  ) 

Definition at line 640 of file InputDevice.cpp.

References init_inputs().

Referenced by clone().

00640                       : InputDevice("Keyboard") {
00641      init_inputs();
00642    };

Here is the call graph for this function:

Here is the caller graph for this function:


Member Function Documentation

InputDevice * cmil::Keyboard::clone (  )  const [virtual]

Devices must provide this function in order to achieve certain custom properties on on construction, this function is accessed by translators.

Reimplemented from cmil::InputDevice.

Definition at line 751 of file InputDevice.cpp.

References getName(), Keyboard(), and cmil::InputDevice::setInputs().

00751                                      {
00752     InputDevice* clone = new Keyboard(getName()); 
00753     clone->setInputs( *this ); 
00754     return clone;
00755   };

Here is the call graph for this function:

std::string cmil::Keyboard::getName (  )  const [inline, virtual]

Get the name of the device.

Reimplemented from cmil::InputDevice.

Definition at line 264 of file InputDevice.h.

Referenced by clone().

00264                                 {
00265         return "Keyboard";
00266       }; 

Here is the caller graph for this function:

void cmil::Keyboard::init_inputs (  )  [private]

This is for ctor use only.

Definition at line 644 of file InputDevice.cpp.

References cmil::InputDevice::add().

Referenced by Keyboard().

00644                               {
00645       //Function keys
00646       add(new Press("Escape"));
00647       add(new Press("F1"));  add(new Press("F2"));
00648       add(new Press("F3"));  add(new Press("F4"));
00649       add(new Press("F5"));  add(new Press("F6")); 
00650       add(new Press("F7"));  add(new Press("F8")); 
00651       add(new Press("F9"));  add(new Press("F10")); 
00652       add(new Press("F11")); add(new Press("F12")); 
00653 
00654       add(new Press("Print")); add(new Press("Scroll Lock"));
00655       add(new Press("Pause"));
00656 
00657       //Numbers and their alternate
00658       add(new Press("1"));        add(new Press("Exclaimation Mark"));  
00659       add(new Press("2"));        add(new Press("@"));                  
00660       add(new Press("3"));        add(new Press("Hash"));               
00661       add(new Press("4"));        add(new Press("Dollar Sign"));        
00662       add(new Press("5"));        add(new Press("Percent"));            
00663       add(new Press("6"));        add(new Press("Caret"));              
00664       add(new Press("7"));        add(new Press("Ampersand"));          
00665       add(new Press("8"));        add(new Press("Asterisk"));           
00666       add(new Press("9"));        add(new Press("Left Parenthesis"));   
00667       add(new Press("0"));        add(new Press("Right Parenthesis"));  
00668       add(new Press("Minus"));    add(new Press("Underscore")); 
00669       add(new Press("Plus"));     add(new Press("Equals")); 
00670       add(new Press("Backspace"));  
00671 
00672       add(new Press("Q")); add(new Press("W")); add(new Press("E"));
00673       add(new Press("R")); add(new Press("T")); add(new Press("Y"));
00674       add(new Press("U")); add(new Press("I")); add(new Press("O"));
00675       add(new Press("P")); add(new Press("A")); add(new Press("S"));
00676       add(new Press("D")); add(new Press("F")); add(new Press("G"));
00677       add(new Press("H")); add(new Press("J")); add(new Press("K")); 
00678       add(new Press("L")); add(new Press("Z")); add(new Press("X")); 
00679       add(new Press("C")); add(new Press("V")); add(new Press("B")); 
00680       add(new Press("N")); add(new Press("M")); 
00681 
00682       //Symbols and their alternate
00683       add(new Press("Tab")); 
00684       add(new Press("Capslock")); 
00685 
00686       add(new Press("Less Than"));    add(new Press("Comma")); 
00687       add(new Press("Greater Than")); add(new Press("Period")); 
00688 
00689       add(new Press("Left Shift")); 
00690       add(new Press("Right Shift")); 
00691       add(new Press("Shift")); 
00692 
00693       add(new Press("Left Ctrl")); 
00694       add(new Press("Right Ctrl")); 
00695       add(new Press("Ctrl")); 
00696 
00697       add(new Press("Left Alt")); 
00698       add(new Press("Right Alt")); 
00699       add(new Press("Alt")); 
00700 
00701       add(new Press("Return")); 
00702       add(new Press("Space")); 
00703 
00704       add(new Press("Insert"));
00705       add(new Press("Home"));
00706       add(new Press("Page Up"));
00707       add(new Press("Delete"));
00708       add(new Press("End"));
00709       add(new Press("Page Down"));
00710 
00711       add(new Press("Left")); 
00712       add(new Press("Right")); 
00713       add(new Press("Up")); 
00714       add(new Press("Down")); 
00715 
00716       add(new Press("NumLock"));
00717       add(new Press("Keypad Forward Slash"));
00718       add(new Press("Keypad Asterisk")); 
00719       add(new Press("Keypad Minus ")); 
00720       add(new Press("Keypad Plus")); 
00721       add(new Press("Keypad Enter")); 
00722 
00723       add(new Press("Keypad Zero"));      add(new Press("Keypad Insert")); 
00724       add(new Press("Keypad Period"));    add(new Press("Keypad Delete")); 
00725 
00726       add(new Press("Keypad Left"));      add(new Press("Keypad 4")); 
00727       add(new Press("Keypad Right"));     add(new Press("Keypad 6")); 
00728       add(new Press("Keypad Up"));        add(new Press("Keypad 8")); 
00729       add(new Press("Keypad Down"));      add(new Press("Keypad 2")); 
00730 
00731       add(new Press("Keypad Home"));      add(new Press("Keypad 7")); 
00732       add(new Press("Keypad Page Up"));   add(new Press("Keypad 9")); 
00733       add(new Press("Keypad Page Down")); add(new Press("Keypad 3")); 
00734       add(new Press("Keypad End"));       add(new Press("Keypad 1"));
00735       add(new Press("Keypad 5"));
00736 
00737       add(new Press("Foward Slash"));     add(new Press("Question Mark"));     
00738       add(new Press("|"));                add(new Press("Back Slash")); 
00739       add(new Press("Right Bracket")); 
00740       add(new Press("Left Bracket")); 
00741       add(new Press("Backquote")); 
00742       add(new Press("Colon"));            add(new Press("Semi Colon")); 
00743       add(new Press("Double Quote"));     add(new Press("Quote")); 
00744    };

Here is the call graph for this function:

Here is the caller graph for this function:

bool cmil::Keyboard::operator== ( const Keyboard keyboard  )  const

Definition at line 746 of file InputDevice.cpp.

References cmil::InputDevice::getInputs(), Logger::log_debug(), and cmil::InputDevice::m_inputs.

00746                                                            { 
00747      log_debug("(Keyboard) operator== Keyboard& ");
00748      return (m_inputs == keyboard.getInputs());
00749    };

Here is the call graph for this function:


The documentation for this class was generated from the following files:
(c) 2006-2007 John P. Feltz
Generated on Wed Jul 25 16:08:03 2007 for Common Media Input Layer by doxygen 1.4.7

SourceForge.net Logo