Add the "all" option for the uictl

bug/bundler_fix
Roberto Soares 2015-04-09 01:04:50 -03:00
parent c9bf8f3140
commit 1591c92547
1 changed files with 9 additions and 1 deletions

View File

@ -89,7 +89,7 @@ class Console::CommandDispatcher::Stdapi::Ui
def cmd_uictl(*args)
if (args.length < 2)
print_line(
"Usage: uictl [enable/disable] [keyboard/mouse]")
"Usage: uictl [enable/disable] [keyboard/mouse/all]")
return true
end
@ -102,6 +102,10 @@ class Console::CommandDispatcher::Stdapi::Ui
when 'mouse'
print_line("Enabling mouse...")
client.ui.enable_mouse
when 'all'
print_line("Enabling all...")
client.ui.enable_keyboard
client.ui.enable_mouse
else
print_error("Unsupported user interface device: #{args[1]}")
end
@ -113,6 +117,10 @@ class Console::CommandDispatcher::Stdapi::Ui
when 'mouse'
print_line("Disabling mouse...")
client.ui.disable_mouse
when 'all'
print_line("Disabling all...")
client.ui.disable_keyboard
client.ui.disable_mouse
else
print_error("Unsupported user interface device: #{args[1]}")
end