Loading...
Searching...
No Matches
Keyboard.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  sf
 
namespace  sf::Keyboard
 Give access to the real-time state of the keyboard.
 

Typedefs

using sf::Keyboard::Scancode = Scan
 

Enumerations

enum class  sf::Keyboard::Key {
  sf::Keyboard::Unknown = -1 , sf::Keyboard::A = 0 , sf::Keyboard::B , sf::Keyboard::C ,
  sf::Keyboard::D , sf::Keyboard::E , sf::Keyboard::F , sf::Keyboard::G ,
  sf::Keyboard::H , sf::Keyboard::I , sf::Keyboard::J , sf::Keyboard::K ,
  sf::Keyboard::L , sf::Keyboard::M , sf::Keyboard::N , sf::Keyboard::O ,
  sf::Keyboard::P , sf::Keyboard::Q , sf::Keyboard::R , sf::Keyboard::S ,
  sf::Keyboard::T , sf::Keyboard::U , sf::Keyboard::V , sf::Keyboard::W ,
  sf::Keyboard::X , sf::Keyboard::Y , sf::Keyboard::Z , sf::Keyboard::Num0 ,
  sf::Keyboard::Num1 , sf::Keyboard::Num2 , sf::Keyboard::Num3 , sf::Keyboard::Num4 ,
  sf::Keyboard::Num5 , sf::Keyboard::Num6 , sf::Keyboard::Num7 , sf::Keyboard::Num8 ,
  sf::Keyboard::Num9 , sf::Keyboard::Escape , sf::Keyboard::LControl , sf::Keyboard::LShift ,
  sf::Keyboard::LAlt , sf::Keyboard::LSystem , sf::Keyboard::RControl , sf::Keyboard::RShift ,
  sf::Keyboard::RAlt , sf::Keyboard::RSystem , sf::Keyboard::Menu , sf::Keyboard::LBracket ,
  sf::Keyboard::RBracket , sf::Keyboard::Semicolon , sf::Keyboard::Comma , sf::Keyboard::Period ,
  sf::Keyboard::Apostrophe , sf::Keyboard::Slash , sf::Keyboard::Backslash , sf::Keyboard::Grave ,
  sf::Keyboard::Equal , sf::Keyboard::Hyphen , sf::Keyboard::Space , sf::Keyboard::Enter ,
  sf::Keyboard::Backspace , sf::Keyboard::Tab , sf::Keyboard::PageUp , sf::Keyboard::PageDown ,
  sf::Keyboard::End , sf::Keyboard::Home , sf::Keyboard::Insert , sf::Keyboard::Delete ,
  sf::Keyboard::Add , sf::Keyboard::Subtract , sf::Keyboard::Multiply , sf::Keyboard::Divide ,
  sf::Keyboard::Left , sf::Keyboard::Right , sf::Keyboard::Up , sf::Keyboard::Down ,
  sf::Keyboard::Numpad0 , sf::Keyboard::Numpad1 , sf::Keyboard::Numpad2 , sf::Keyboard::Numpad3 ,
  sf::Keyboard::Numpad4 , sf::Keyboard::Numpad5 , sf::Keyboard::Numpad6 , sf::Keyboard::Numpad7 ,
  sf::Keyboard::Numpad8 , sf::Keyboard::Numpad9 , sf::Keyboard::F1 , sf::Keyboard::F2 ,
  sf::Keyboard::F3 , sf::Keyboard::F4 , sf::Keyboard::F5 , sf::Keyboard::F6 ,
  sf::Keyboard::F7 , sf::Keyboard::F8 , sf::Keyboard::F9 , sf::Keyboard::F10 ,
  sf::Keyboard::F11 , sf::Keyboard::F12 , sf::Keyboard::F13 , sf::Keyboard::F14 ,
  sf::Keyboard::F15 , sf::Keyboard::Pause
}
 Key codes. More...
 
enum class  sf::Keyboard::Scan {
  sf::Keyboard::Unknown = -1 , sf::Keyboard::A = 0 , sf::Keyboard::B , sf::Keyboard::C ,
  sf::Keyboard::D , sf::Keyboard::E , sf::Keyboard::F , sf::Keyboard::G ,
  sf::Keyboard::H , sf::Keyboard::I , sf::Keyboard::J , sf::Keyboard::K ,
  sf::Keyboard::L , sf::Keyboard::M , sf::Keyboard::N , sf::Keyboard::O ,
  sf::Keyboard::P , sf::Keyboard::Q , sf::Keyboard::R , sf::Keyboard::S ,
  sf::Keyboard::T , sf::Keyboard::U , sf::Keyboard::V , sf::Keyboard::W ,
  sf::Keyboard::X , sf::Keyboard::Y , sf::Keyboard::Z , sf::Keyboard::Num1 ,
  sf::Keyboard::Num2 , sf::Keyboard::Num3 , sf::Keyboard::Num4 , sf::Keyboard::Num5 ,
  sf::Keyboard::Num6 , sf::Keyboard::Num7 , sf::Keyboard::Num8 , sf::Keyboard::Num9 ,
  sf::Keyboard::Num0 , sf::Keyboard::Enter , sf::Keyboard::Escape , sf::Keyboard::Backspace ,
  sf::Keyboard::Tab , sf::Keyboard::Space , sf::Keyboard::Hyphen , sf::Keyboard::Equal ,
  sf::Keyboard::LBracket , sf::Keyboard::RBracket , sf::Keyboard::Backslash , sf::Keyboard::Semicolon ,
  sf::Keyboard::Apostrophe , sf::Keyboard::Grave , sf::Keyboard::Comma , sf::Keyboard::Period ,
  sf::Keyboard::Slash , sf::Keyboard::F1 , sf::Keyboard::F2 , sf::Keyboard::F3 ,
  sf::Keyboard::F4 , sf::Keyboard::F5 , sf::Keyboard::F6 , sf::Keyboard::F7 ,
  sf::Keyboard::F8 , sf::Keyboard::F9 , sf::Keyboard::F10 , sf::Keyboard::F11 ,
  sf::Keyboard::F12 , sf::Keyboard::F13 , sf::Keyboard::F14 , sf::Keyboard::F15 ,
  sf::Keyboard::F16 , sf::Keyboard::F17 , sf::Keyboard::F18 , sf::Keyboard::F19 ,
  sf::Keyboard::F20 , sf::Keyboard::F21 , sf::Keyboard::F22 , sf::Keyboard::F23 ,
  sf::Keyboard::F24 , sf::Keyboard::CapsLock , sf::Keyboard::PrintScreen , sf::Keyboard::ScrollLock ,
  sf::Keyboard::Pause , sf::Keyboard::Insert , sf::Keyboard::Home , sf::Keyboard::PageUp ,
  sf::Keyboard::Delete , sf::Keyboard::End , sf::Keyboard::PageDown , sf::Keyboard::Right ,
  sf::Keyboard::Left , sf::Keyboard::Down , sf::Keyboard::Up , sf::Keyboard::NumLock ,
  sf::Keyboard::NumpadDivide , sf::Keyboard::NumpadMultiply , sf::Keyboard::NumpadMinus , sf::Keyboard::NumpadPlus ,
  sf::Keyboard::NumpadEqual , sf::Keyboard::NumpadEnter , sf::Keyboard::NumpadDecimal , sf::Keyboard::Numpad1 ,
  sf::Keyboard::Numpad2 , sf::Keyboard::Numpad3 , sf::Keyboard::Numpad4 , sf::Keyboard::Numpad5 ,
  sf::Keyboard::Numpad6 , sf::Keyboard::Numpad7 , sf::Keyboard::Numpad8 , sf::Keyboard::Numpad9 ,
  sf::Keyboard::Numpad0 , sf::Keyboard::NonUsBackslash , sf::Keyboard::Application , sf::Keyboard::Execute ,
  sf::Keyboard::ModeChange , sf::Keyboard::Help , sf::Keyboard::Menu , sf::Keyboard::Select ,
  sf::Keyboard::Redo , sf::Keyboard::Undo , sf::Keyboard::Cut , sf::Keyboard::Copy ,
  sf::Keyboard::Paste , sf::Keyboard::VolumeMute , sf::Keyboard::VolumeUp , sf::Keyboard::VolumeDown ,
  sf::Keyboard::MediaPlayPause , sf::Keyboard::MediaStop , sf::Keyboard::MediaNextTrack , sf::Keyboard::MediaPreviousTrack ,
  sf::Keyboard::LControl , sf::Keyboard::LShift , sf::Keyboard::LAlt , sf::Keyboard::LSystem ,
  sf::Keyboard::RControl , sf::Keyboard::RShift , sf::Keyboard::RAlt , sf::Keyboard::RSystem ,
  sf::Keyboard::Back , sf::Keyboard::Forward , sf::Keyboard::Refresh , sf::Keyboard::Stop ,
  sf::Keyboard::Search , sf::Keyboard::Favorites , sf::Keyboard::HomePage , sf::Keyboard::LaunchApplication1 ,
  sf::Keyboard::LaunchApplication2 , sf::Keyboard::LaunchMail , sf::Keyboard::LaunchMediaSelect
}
 Scancodes. More...
 

Functions

bool sf::Keyboard::isKeyPressed (Key key)
 Check if a key is pressed.
 
bool sf::Keyboard::isKeyPressed (Scancode code)
 Check if a key is pressed.
 
Key sf::Keyboard::localize (Scancode code)
 Localize a physical key to a logical one.
 
Scancode sf::Keyboard::delocalize (Key key)
 Identify the physical key corresponding to a logical one.
 
String sf::Keyboard::getDescription (Scancode code)
 Provide a string representation for a given scancode.
 
void sf::Keyboard::setVirtualKeyboardVisible (bool visible)
 Show or hide the virtual keyboard.
 

Variables

static constexpr unsigned int sf::Keyboard::KeyCount {static_cast<unsigned int>(Key::Pause) + 1}
 The total number of keyboard keys, ignoring Key::Unknown
 
static constexpr unsigned int sf::Keyboard::ScancodeCount {static_cast<unsigned int>(Scan::LaunchMediaSelect) + 1}
 The total number of scancodes, ignoring Scan::Unknown