ORI ACSL

Applied Computer Simulation Labs

  • Increase font size
  • Default font size
  • Decrease font size

Mouse and Joystick Input for WheelchairNet

It is possible to alter the input map for the WheelchairNet system. The input map refers to a configuration script that controls which buttons on a mouse or joystick activate specific actions in the training environments. Once WheelchairNet is installed, the input map script file can be located here:

C:\Users\ORI-ACSL\WCNET\apps\wcnet\scripts\inputmap.tcl

It is recommended that if you decide to edit the inputmap.tcl script that you make a copy of the original script to preserve the default values. Also note that changes made to the inputmap.tcl script will not apply until you have restarted WheelchairNet.


The inputmap.tcl script is below. Note the red-colored text: btn0, btn1, and btn2. These refer to the three buttons on a 3-button mouse. As configured by default:

  • button 1 (btn0) refers to a left-mouse-click.
  • button 2 (btn1) refers to a right-mouse-click.
  • button 3 (btn2) refers to a middle-mouse button click.

Joysticks are configured similarly, with btn0 being the primary "Fire" button on a joystick.

Comments in the code below explain other input mapping assignments from the keyboard.

Here is the default inputmap.tct script:

/sys/servers/input.beginmap

#### comment out following lines to disable joystick button
/sys/servers/input.map joy0:btn0.up  togglelook
/sys/servers/input.map joy0:btn0.up  menubtnup
/sys/servers/input.map joy0:btn0.down  menubtndown
#############

/sys/servers/input.map mouse0:btn0.down   left_mouse_btn_clicked
/sys/servers/input.map mouse0:btn1.down   right_mouse_btn_clicked
/sys/servers/input.map mouse0:btn2.down   middle_mouse_btn_clicked

/sys/servers/input.map mouse0:btn1.pressed menu
/sys/servers/input.map keyb0:menu&mouse0:btn0.pressed   orbit
/sys/servers/input.map keyb0:menu&mouse0:btn1.pressed   dolly
/sys/servers/input.map keyb0:menu&mouse0:btn2.pressed   pan
/sys/servers/input.map keyb0:ctrl&mouse0:btn0.pressed   move
/sys/servers/input.map keyb0:ctrl&mouse0:btn1.pressed   move_up

/sys/servers/input.map keyb0:z.down    lookdown
/sys/servers/input.map keyb0:a.down    lookup

/sys/servers/input.map keyb0:up.pressed   forward
/sys/servers/input.map keyb0:down.pressed   backward
/sys/servers/input.map keyb0:left.pressed   left
/sys/servers/input.map keyb0:right.pressed   right

/sys/servers/input.map keyb0:shift&keyb0:up.down   "script:look 0"
/sys/servers/input.map keyb0:shift&keyb0:down.down   "script:look 180"
/sys/servers/input.map keyb0:shift&keyb0:left.down   "script:look 90"
/sys/servers/input.map keyb0:shift&keyb0:right.down   "script:look -90"

/sys/servers/input.map keyb0:r.down                "script:reset_cam"

/sys/servers/input.map keyb0:f1.down       "script:toggle_help"
/sys/servers/input.map keyb0:i.down       "script:toggle_info"
/sys/servers/input.map keyb0:tab.down      "script:net::toggleUserList"
/sys/servers/input.map keyb0:f11.down         "script:/sys/servers/console.logwatch"
/sys/servers/input.map keyb0:f9.down         "script:/sys/servers/console.toggle"

/sys/servers/input.map keyb0:esc.down       "script:do_esc"
/sys/servers/input.map keyb0:shift&keyb0:esc.down      shutdown

/sys/servers/input.map keyb0:1.down "script:chat::play_canned_chat 1"
/sys/servers/input.map keyb0:2.down "script:chat::play_canned_chat 2"
/sys/servers/input.map keyb0:3.down "script:chat::play_canned_chat 3"
/sys/servers/input.map keyb0:4.down "script:chat::play_canned_chat 4"
/sys/servers/input.map keyb0:5.down "script:chat::play_canned_chat 5"
/sys/servers/input.map keyb0:6.down "script:chat::play_canned_chat 6"
/sys/servers/input.map keyb0:7.down "script:chat::play_canned_chat 7"
/sys/servers/input.map keyb0:8.down "script:chat::play_canned_chat 8"
/sys/servers/input.map keyb0:9.down "script:chat::play_canned_chat 9"
/sys/servers/input.map keyb0:0.down "script:chat::play_canned_chat 0"

/sys/servers/input.map keyb0:s.down "script:sound::toggle_mute"

/sys/servers/input.map keyb0:t.down chat

/sys/servers/input.map keyb0:space.down "script:/sys/servers/gui.togglefocus mainmenu"

/sys/servers/input.map keyb0:m.down "script:/sys/servers/chat.togglealwayson"

/sys/servers/input.map keyb0:d.down "script:/sys/servers/tracker.reset"
/sys/servers/input.map keyb0:e.down "script:/sys/servers/tracker.flipxz"

/sys/servers/input.map keyb0:shift&keyb0:x.down "script:skill::set_turbo 1"
/sys/servers/input.map keyb0:shift&keyb0:c.down "script:skill::set_turbo 2"
/sys/servers/input.map keyb0:shift&keyb0:v.down "script:skill::set_turbo 3"


#####  uncomment the following line to enable collsion map editing  #####
#runscript "inputmap_colmap_edit.tcl"

#####  for debugging, should be commented out in release versions
#runscript "inputmap_debug.tcl"

/sys/servers/input.endmap