Skip to content

Shortcuts

Gentilhomme edited this page Jul 3, 2016 · 1 revision

#Shortcuts

Shortcut is a namespace for the keyboard function & the mouse class. These class are high level implementation of the Sup.Input API.The goal was to simplify Input methodes.

Keyboard

if(U.Key("A").pressed()) {
    // A key pressed!
}

if(U.Key("LEFT","RIGHT").down()) {
    // Left OR Right key are dpwn!
    // Note : if you want the AND condition => U.Key("LEFT","RIGHT").down(false)
}
Possible actions
down()
pressed()
released()

Mouse

Under development

if(U.Mouse.left) {
   // Mouse left click pressed
}
Possible actions
left
right
middle
Clone this wiki locally