# Class: input

Luxinia's function publishing does not offer direct calling of external functions if an event arises, such as key or mouseinputs. Instead, Luxinia saves event occurances in queues that can be processed when the scripting language is running.

## Methods:

### Method overview:

- escquit
- fixmouse
- intconsole
- intrecord
- intscreenshot
- iskeydown
- ismousedown
- joystick
- mousepos
- mousewheel
- popkey
- popmouse
- showmouse

escquit ([boolean on])
  returns: ([boolean on])
  sets or gets quit when esc is pressed
fixmouse (boolean fix)
  returns: ([boolean fixed])
  If the OS mousecursor is not shown, this flag is either locking the mousecursor at the center of the window or disallows it. Per default, this value is set to true.
intconsole ([boolean on])
  returns: ([boolean on])
  sets or gets if internal console is allowed (F1).
intrecord ([boolean on])
  returns: ([boolean on])
  sets or gets if internal record via auto screenshot is allowed (F11).
intscreenshot ([boolean on])
  returns: ([boolean on])
  sets or gets if internal screenshot is allowed (F3 jpg, F4 tga).
iskeydown (int keycode)
  returns: (boolean isDown)
  returns true if the key is pressed.
ismousedown (int mousebutton)
  returns: (boolean isDown)
  returns true if the mousebutton is currently hold down. The mousebutton must be >=0 and <3 where 0 is the left, 1 the right and 2 the middle mousebutton.
joystick ([int nr])
  returns: (boolean exists,[int joysticknr,int axiscount,int btncnt, float pos1,..., boolean btn1,...])
  returns joystick position and currently pressed buttons or false, if the given number does not exist. If no number is passed, joystick 0 is used. nr must be smaller than 16 and >= 0. Luxinia limits the number of axis to 8 and the number of buttons to 32, which should be enough.
mousepos ([float x,y])
  returns: ([float x,y])
  sets or gets mouseposition in reference coordinates (see window.refsize)
mousewheel ([int])
  returns: ([int])
  sets or gets mousewheelposition
popkey ()
  returns: ([int key, int keycode, boolean isDown])
  pops a key from keyhistoryqueue. The key is the resulted char of the keyboard. The keycode is the number on the keyboard, which doesn't have to be a printable letter. In case of unprintable letters, key is 0.
popmouse ()
  returns: ([float x,y, int button, boolean isDown,float time_seconds])
  pops a mouseevent from queue. -1 button means no button changes (only motion).
showmouse (boolean visible)
  returns: ()
  sets mouse visibility of the operating system. Only if the mouse is visible, it can be moved out from the window. The invisible mouse may have coordinates that are outside the window. Initially, the mouse is invisible. If the console is activated and deactivated, the visibilitystatus is set to invisible again.