💻
pasteware
  • Introduction
  • Namespaces
    • engine_client
    • global_vars
    • renderer
    • config
    • math
    • input
    • cheat
  • Hooks
    • CreateMove
    • PaintTraverse
    • FrameStageNotify
  • Types
    • CUserCmd
    • ang_t
    • vec3_t
    • vec2_t
    • color_t
Powered by GitBook
On this page
  • is_key_down( vk ): bool
  • is_key_pressed( vk ): bool
  • is_cursor_in_bounds( x0, y0, x1, y1 ): bool
  • get_cursor_pos(): vec2_t

Was this helpful?

  1. Namespaces

input

PreviousmathNextcheat

Last updated 4 years ago

Was this helpful?

You can find a list of virtual key codes here:

is_key_down( vk ): bool

Returns if the key is being held down or not

Type

Name

Description

int

vk

The virtual key code you want to check

if ( input.is_key_down( 0x01 ) ) {

}

is_key_pressed( vk ): bool

Returns if the key was pressed or not

Type

Name

Description

int

vk

The virtual key code you want to check

if ( input.is_key_pressed( 0x01 ) ) {

}

is_cursor_in_bounds( x0, y0, x1, y1 ): bool

Returns if the mouse cursor is inside the given bounds or not

Type

Name

Description

float

x0

Starting position on the x axis

float

y0

Starting position on the y axis

float

x1

Ending position on the x axis

float

y1

Ending position on the y axis

if ( input.is_cursor_in_bounds( 0, 0, 1920, 1080 ) ) {

}

get_cursor_pos(): vec2_t

Returns the position of the mouse cursor

var cursor_pos = input.get_cursor_pos();
https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes