"No one can be told what GeeXLab is, you have to see it for yourself!"

"Stop Playing Games and Start Making Them! With GeeXLab, your are on your way!"


Quick Links
What is GeeXLab
Download GeeXLab
GeeXLab Requirements
Online Help
Articles and Tutorials
Samples Screenshots
Videos

GeeXLab Changelog

XML Ref. Guide
Scripting Ref. Guide
Code Samples

Purchase GeeXLab
GeeXLab SDK

Shader Library

Follow GeeXLab's News
GeeXLab news, articles, tutorials and demos @ Geeks3D.com
GeeXLab @ Twitter GeeXLab RSS Feed

Subscribe to GeeXLab news by email

[ Back to Geeks3D.com ]

GeeXLab

GeeXLab

Laboratory for Real Time 3D Programming (prototyping and demos)
OpenGL, Lua, Python, GLSL,
PhysX and more...

Reference Guide
Host-API Lua / Python



Back to Homepage
Back to Developer's Guide Index

HYP_Input Library


Description
User input library

Number of functions: 14

HYP_Input.SetDefaultInputManagementState

Description
SetDefaultInputManagementState enables or disables the user input default management (keyboard, mouse). It is recommended to totally disable the default management in case the user wants to use its own camera routines.

Languages: Lua - Python

Parameters
  • state [INTEGER]: enables (1) or disables (0) user input default management - Values = 0|1

    Code sample :

    HYP_Input.SetDefaultInputManagementState(0)


    HYP_Input.IsKeyboardKeyPressed

    Description
    Returns the state of a specific key.

    Languages: Lua - Python

    Parameters
  • key [INTEGER]: key code

    Return Values
  • isPressed [INTEGER]: state of the key: 1 if down or 0 if up.

    Code sample :

    HYP_KEY_A = 65
    state = HYP_Input.IsKeyboardKeyPressed(HYP_KEY_A)


    HYP_Input.GetKeyState

    Description
    Returns the state of a key.

    Languages: Lua - Python

    Parameters
  • key [INTEGER]: key code

    Return Values
  • state [INTEGER]: state of the key: 1 if down or 0 if up.

    Code sample :

    HYP_KEY_A = 65
    state = HYP_Input.GetKeyState(HYP_KEY_A)


    HYP_Input.GetMousePos

    Description
    Returns mouse's position in screen space: position (0;0) is the top-left corner.

    Languages: Lua - Python

    Return Values
  • x, y [INTEGER]: mouse's position.

    Code sample :

    x, y = HYP_Input.GetMousePos()


    HYP_Input.GetMousePositionInWorldSpace

    Description
    converts mouse position in screen space to 2D space. In 2D space, the position (0;0) is on the center of the screen.

    Languages: Lua - Python

    Return Values
  • x, y [INTEGER]: mouse'position in world 2D space: the position (0;0) is in window's center.

    Code sample :

    x, y = HYP_Input.GetMousePositionInWorldSpace()


    HYP_Input.SetMousePos

    Description
    Sets mouse's position in screen space: position (0;0) is the top-left corner.

    Languages: Lua - Python

    Parameters
  • x, y [INTEGER]: mouse's position.

    Code sample :

    HYP_Input.SetMousePos(x, y)


    HYP_Input.SetMouseWheelDefaultManagementState

    Description
    Allows to enable or disable the default management of mouse's wheel.

    Languages: Lua - Python

    Parameters
  • state [INTEGER]: 1 (enabled) or 0 (disabled)

    Code sample :

    HYP_Input.SetMouseWheelDefaultManagementState(0)


    HYP_Input.GetMouseWheelDelta

    Description
    Returns mouse's wheel delta value.

    Languages: Lua - Python

    Return Values
  • delta [INTEGER]: mouse's wheel delta.

    Code sample :

    delta = HYP_Input.GetMouseWheelDelta()


    HYP_Input.ShowMouseCursor

    Description
    Shows mouse's cursor.

    Languages: Lua - Python

    Code sample :

    HYP_Input.ShowMouseCursor()


    HYP_Input.HideMouseCursor

    Description
    Hides mouse's cursor.

    Languages: Lua - Python

    Code sample :

    HYP_Input.HideMouseCursor()


    HYP_Input.GetMouseButtonState

    Description
    Returns the state of mouse's buttons.

    Languages: Lua - Python

    Parameters
  • button [INTEGER]: specifies the button of the mouse to be tested: 1 (left) or 2 (right).

    Return Values
  • state [INTEGER]: state of button: 1 for bufton down or 0 for button up

    Code sample :

    state = HYP_Input.GetMouseButtonState(1)


    HYP_Input.IsJoystickEnabled

    Description
    Checks that a particular joystick has been correctly initialized. Currently, only 2 joysticks are supported.

    Languages: Lua - Python

    Parameters
  • joyId [INTEGER]: Specifies the joystick to be tested: 1 or 2.

    Return Values
  • state [INTEGER]: 1 if the joystick is correctly initialized and 0 if not

    Code sample :

    state = HYP_Input.IsJoystickEnabled(1)


    HYP_Input.GetJoystickButtonState

    Description
    Allows to know if a joystick button has been pressed. Currently only the first 4 buttons are supported.

    Languages: Lua - Python

    Parameters
  • joyId [INTEGER]: Specifies the joystick to be tested: 1 or 2.
  • button [INTEGER]: Specifies the button to be tested: 0, 1, 2 or 3.

    Return Values
  • state [INTEGER]: 1 if the button has been pressed and 0 if not.

    Code sample :

    state = HYP_Input.GetJoystickButtonState(1, 3)


    HYP_Input.GetJoystickPosition

    Description
    Returns get the joystick's position on X and Y axis.

    Languages: Lua - Python

    Parameters
  • joyId [INTEGER]: Specifies the joystick to be tested: 1 or 2.

    Return Values
  • x, y [INTEGER]: joystick's position.

    Code sample :

    x, y = HYP_Input.GetJoystickPosition(1)




  • Random Projects

    Dream Vision Effect
    Dream Vision Effect

    Posterization Effect
    Posterization Effect

    PyOpenGL_LAB
    PyOpenGL_LAB


    Random Code Samples

    OBJ Format Loading
    OBJ Format Loading

    MP3 File
    MP3 File

    Model Cloning
    Model Cloning



    (C)2009-2010 Geeks3D.com