πŸ–±οΈInputs

No support for joystick. because there is no joystick

Mouse

hidecursor()
showcursor()
disablemouse()
enablemouse()//turns on the mouse (comes on automatically)
console.log(getMouselocation())//{x: 147, y: 181, lastx: 394, lasty: 337}
//previous mouse position: layerx,layery,maybe you use this system in dragging

leftclicked = function(location,component){
    if(component) console.log(component.name+": you are clicked me",location)
    else console.log(location)//{x: 1026, y: 724}
}
rightclicked = function(location,component){
    if(component) console.log(component.name+": you are right clicked me",location)
    else console.log(location)//{x: 1026, y: 724}
}
mousemove = function(location,component){
    if(component) console.log(component.name+": you are hover me",location)
    else console.log(location)//{x: 1026, y: 724}
}
mouseup = function(location,component){
    if(component) console.log(component.name+": you got your mouse up",location)
    else console.log(location)//{x: 1026, y: 724}
}
mousedown = function(location,component){
    if(component) console.log(component.name+": you got your mouse down",location)
    else console.log(location)//{x: 1026, y: 724}
}
mousescroll = function(location,speed){
    console.log(location,speed)//location could be: down,up
    //down 100
    //up -100
}
editcursor("pointer")//replaces the mouse
editcursor("url('test.gif'), auto")//you can change cursor to png

Edit cursors

all mouse types. example: editcursor("wait")

Keyboard

Keys are always uppercase

Sometimes keypress may not understand or understand the key too much. To prevent this, you can change the forcepresstime in onload.js.

Touch screen

Last updated