Cleaned up CommandLine a bit
This commit is contained in:
parent
b120e5f14c
commit
27a1a29d4c
1 changed files with 36 additions and 30 deletions
|
@ -154,35 +154,33 @@ CommandLineParser::init_argp()
|
|||
.add_option(OPTION_LIST_CONTROLLER, 'L', "list-controller", "", "list available controllers")
|
||||
.add_newline()
|
||||
|
||||
.add_text("Configuration Options: ")
|
||||
.add_text("List Options: ")
|
||||
.add_option(OPTION_LIST_SUPPORTED_DEVICES, 0, "list-supported-devices", "", "list supported devices (used by xboxdrv-daemon.py)", false)
|
||||
.add_option(OPTION_LIST_SUPPORTED_DEVICES_XPAD, 0, "list-supported-devices-xpad", "", "list supported devices in xpad.c style", false)
|
||||
.add_option(OPTION_HELP_LED, 0, "help-led", "", "list possible values for the led")
|
||||
.add_option(OPTION_HELP_DEVICES, 0, "help-devices", "", "list supported devices")
|
||||
.add_option(OPTION_LIST_ABS, 0, "help-abs", "", "list all possible EV_ABS names")
|
||||
.add_option(OPTION_LIST_REL, 0, "help-rel", "", "list all possible EV_REL names")
|
||||
.add_option(OPTION_LIST_KEY, 0, "help-key", "", "list all possible EV_KEY names")
|
||||
.add_option(OPTION_LIST_X11KEYSYM, 0, "help-x11keysym", "", "list all possible X11KeySym")
|
||||
.add_option(OPTION_LIST_AXIS, 0, "help-axis", "", "list all possible XboxAxis")
|
||||
.add_option(OPTION_LIST_BUTTON, 0, "help-button", "", "list all possible XboxButton")
|
||||
.add_option(OPTION_LIST_ALL, 0, "help-all", "", "list all symbols above")
|
||||
.add_newline()
|
||||
|
||||
.add_text("Config File Options: ")
|
||||
.add_option(OPTION_CONFIG, 'c', "config", "FILE", "read configuration from FILE")
|
||||
.add_option(OPTION_ALT_CONFIG, 0, "alt-config", "FILE", "read alternative configuration from FILE ")
|
||||
.add_option(OPTION_CONFIG_OPTION,'o', "option", "NAME=VALUE", "Set the given configuration option")
|
||||
.add_option(OPTION_WRITE_CONFIG, 0, "write-config", "FILE", "rite an example configuration to FILE")
|
||||
.add_newline()
|
||||
|
||||
.add_text("List Options: ")
|
||||
.add_option(OPTION_LIST_SUPPORTED_DEVICES, 0, "list-supported-devices", "", "list supported devices (used by xboxdrv-daemon.py)")
|
||||
.add_option(OPTION_LIST_SUPPORTED_DEVICES_XPAD, 0, "list-supported-devices-xpad", "", "list supported devices in xpad.c style")
|
||||
.add_option(OPTION_HELP_LED, 0, "help-led", "", "list possible values for the led")
|
||||
.add_option(OPTION_HELP_DEVICES, 0, "help-devices", "", "list supported devices")
|
||||
.add_option(OPTION_LIST_ABS, 0, "list-abs", "", "List all possible EV_ABS names")
|
||||
.add_option(OPTION_LIST_REL, 0, "list-rel", "", "List all possible EV_REL names")
|
||||
.add_option(OPTION_LIST_KEY, 0, "list-key", "", "List all possible EV_KEY names")
|
||||
.add_option(OPTION_LIST_X11KEYSYM, 0, "list-x11keysym", "", "List all possible X11KeySym")
|
||||
.add_option(OPTION_LIST_AXIS, 0, "list-axis", "", "List all possible XboxAxis")
|
||||
.add_option(OPTION_LIST_BUTTON, 0, "list-button", "", "List all possible XboxButton")
|
||||
.add_option(OPTION_LIST_ALL, 0, "list-all", "", "List all of the above")
|
||||
.add_option(OPTION_WRITE_CONFIG, 0, "write-config", "FILE", "write an example configuration to FILE")
|
||||
.add_newline()
|
||||
|
||||
.add_text("Daemon Options: ")
|
||||
.add_option(OPTION_DAEMON, 'D', "daemon", "", "Run as daemon")
|
||||
.add_option(OPTION_DAEMON_DETACH, 0, "detach", "", "Detach the daemon from the current shell")
|
||||
.add_option(OPTION_DAEMON_PID_FILE, 0, "pid-file", "FILE", "Write daemon pid to FILE")
|
||||
.add_option(OPTION_DAEMON_ON_CONNECT, 0, "on-connect", "FILE", "Launch EXE when a new controller is connected")
|
||||
.add_option(OPTION_DAEMON_ON_DISCONNECT, 0, "on-disconnect", "FILE", "Launch EXE when a controller is disconnected")
|
||||
.add_option(OPTION_DAEMON_MATCH, 0, "match", "RULES", "Only allow controllers that match any of RULES")
|
||||
//FIXME: .add_option(OPTION_DAEMON_MATCH_GROUP, 0, "match-group", "RULES", "Only allow controllers that match all of RULES")
|
||||
.add_option(OPTION_DAEMON_ON_CONNECT, 0, "on-connect", "FILE", "Launch EXE when a new controller is connected", false)
|
||||
.add_option(OPTION_DAEMON_ON_DISCONNECT, 0, "on-disconnect", "FILE", "Launch EXE when a controller is disconnected", false)
|
||||
.add_newline()
|
||||
|
||||
.add_text("Device Options: ")
|
||||
|
@ -203,7 +201,8 @@ CommandLineParser::init_argp()
|
|||
.add_newline()
|
||||
|
||||
.add_text("Status Options: ")
|
||||
.add_option(OPTION_LED, 'l', "led", "NUM", "set LED status, see --help-led (default: 0)")
|
||||
.add_option(OPTION_LED, 'l', "led", "STATUS", "set LED status, see --help-led for possible values")
|
||||
.add_option(OPTION_RUMBLE, 'r', "rumble", "L,R", "set the speed for both rumble motors [0-255] (default: 0,0)")
|
||||
.add_option(OPTION_QUIT, 'q', "quit", "", "only set led and rumble status then quit")
|
||||
.add_newline()
|
||||
|
||||
|
@ -223,23 +222,23 @@ CommandLineParser::init_argp()
|
|||
.add_option(OPTION_FORCE_FEEDBACK, 0, "force-feedback", "", "Enable force feedback support")
|
||||
.add_option(OPTION_RUMBLE_GAIN, 0, "rumble-gain", "NUM", "Set relative rumble strength (default: 255)")
|
||||
.add_option(OPTION_TEST_RUMBLE, 'R', "test-rumble", "", "map rumbling to LT and RT (for testing only)")
|
||||
.add_option(OPTION_RUMBLE, 'r', "rumble", "L,R", "set the speed for both rumble motors [0-255] (default: 0,0)")
|
||||
.add_newline()
|
||||
|
||||
.add_text("Configuration Options: ")
|
||||
.add_option(OPTION_NEXT_CONFIG, 0, "next", "", "Create a new configuration entry", false)
|
||||
.add_option(OPTION_NEXT_CONFIG, 0, "ui-new", "", "", false) // backward compatibility
|
||||
.add_option(OPTION_NEXT_CONFIG, 0, "next-config", "", "", false)
|
||||
|
||||
.add_text("Controller Slot Options: ")
|
||||
.add_option(OPTION_CONTROLLER_SLOT, 0, "controller-slot", "N", "Use controller slot N")
|
||||
.add_option(OPTION_NEXT_CONTROLLER, 0, "next-controller", "", "Create a new controller entry", false)
|
||||
.add_option(OPTION_DAEMON_MATCH, 0, "match", "RULES", "Only allow controllers that match any of RULES")
|
||||
//FIXME: .add_option(OPTION_DAEMON_MATCH_GROUP, 0, "match-group", "RULES", "Only allow controllers that match all of RULES")
|
||||
|
||||
.add_option(OPTION_CONFIG_SLOT, 0, "config-slot", "N", "Use configuration slot N", false)
|
||||
.add_option(OPTION_CONTROLLER_SLOT, 0, "controller-slot", "N", "Use controller slot N", false)
|
||||
.add_text("Configuration Options: ")
|
||||
.add_option(OPTION_CONFIG_SLOT, 0, "config-slot", "N", "Use configuration slot N")
|
||||
.add_option(OPTION_NEXT_CONFIG, 0, "ui-new", "", "", false) // backward compatibility
|
||||
.add_option(OPTION_NEXT_CONFIG, 0, "next-config", "", "Create a new configuration entry")
|
||||
|
||||
.add_option(OPTION_TOGGLE, 0, "toggle", "BTN", "Set button to use for toggling between configs")
|
||||
.add_option(OPTION_TOGGLE, 0, "ui-toggle", "BTN", "") // backward compatibility
|
||||
|
||||
.add_option(OPTION_MODIFIER, 0, "modifier", "MOD=ARGS", "Add a modifier to the modifier spec")
|
||||
.add_option(OPTION_MODIFIER, 0, "modifier", "MOD=ARG:..", "Add a modifier to the modifier spec")
|
||||
.add_option(OPTION_TIMEOUT, 0, "timeout", "INT", "Amount of time to wait fo a device event before processing autofire, etc. (default: 25)")
|
||||
|
||||
.add_option(OPTION_DEADZONE, 0, "deadzone", "INT", "Threshold under which axis events are ignored (default: 0)")
|
||||
|
@ -289,6 +288,13 @@ CommandLineParser::init_argp()
|
|||
.add_pseudo(" auto, autofire:RATE:DELAY", "Enable automatic button press repetition")
|
||||
.add_pseudo(" log:STRING", "Print button value to stdout")
|
||||
.add_newline()
|
||||
|
||||
.add_text("Modifier:")
|
||||
.add_pseudo(" dpad-rotate=DEGREE", "Rotate the dpad by the given number of degree")
|
||||
.add_pseudo(" 4wayrest, four-way-restrictor=XAXIS:YAXIS", "Restrict the given stick to four directions")
|
||||
.add_pseudo(" square, square-axis=XAXIS:YAXIS", "Convert the circular motion range of the given stick to a square one")
|
||||
.add_pseudo(" rotate=XAXIS:YAXIS:DEGREE[:MIRROR]", "Rotate the given stick by DEGREE, optionally also mirror it")
|
||||
.add_newline()
|
||||
|
||||
.add_text("See README for more documentation and examples.")
|
||||
.add_text("Report bugs to Ingo Ruhnke <grumbel@gmail.com>");
|
||||
|
|
Loading…
Reference in a new issue