lovr.system

Edit

The lovr.system provides information about the current platform and hardware.

It also interfaces with the desktop window and window input.

System Information

lovr.system.getCoreCountGet the number of logical cores.
lovr.system.getOSGet the current operating system.
lovr.system.requestPermissionRequest permission to use a feature.

Keyboard

lovr.system.hasKeyRepeatCheck if key repeat is enabled.
lovr.system.isKeyDownGet the state of a key.
lovr.system.setKeyRepeatEnable or disable key repeat.
lovr.system.wasKeyPressedCheck if a key was pressed this frame.
lovr.system.wasKeyReleasedCheck if a key was released this frame.

Mouse

lovr.system.getMousePositionGet the position of the mouse.
lovr.system.getMouseXGet the x position of the mouse.
lovr.system.getMouseYGet the y position of the mouse.
lovr.system.isMouseDownCheck if a mouse button is pressed.
lovr.system.wasMousePressedCheck if a mouse button was pressed this frame.
lovr.system.wasMouseReleasedCheck if a mouse button was released this frame.

Clipboard

lovr.system.getClipboardTextGet the clipboard text.
lovr.system.setClipboardTextSet the clipboard text.

Window

lovr.system.getWindowDensityGet the window pixel density.
lovr.system.getWindowDimensionsGet the dimensions of the window.
lovr.system.getWindowHeightGet the height of the window.
lovr.system.getWindowWidthGet the width of the window.
lovr.system.isWindowFocusedCheck if the desktop window is focused.
lovr.system.isWindowOpenCheck if the desktop window is open.
lovr.system.isWindowVisibleCheck if the desktop window is visible.
lovr.system.openWindowOpen the desktop window.
lovr.system.pollEventsPoll the OS for new window events.