Launchpad Entry: no-input-recovery
Contributors: Bryan Quigley,
(I'm doing in this order)
- Investigate modifying gnome-keyboard-properties to better suit needs
- Make the messages translatable
- Make it KDE friendly (KDE user wants to help do this?)
- Make sure it is XFCE friendly (XFCE user?)
- Make it * friendly (* user?)
- No Keyboard, but mouse: ask if user wants to start on-screen keyboard
- No Mouse, but keyboard: ask if user wants to enable mousekeys (numlock keys as mouse), alert user of how to turn on and off
Now on systems without a detected mouse or keyboard Ubuntu will try to help the user by providing them with a virtual mouse or keyboard.
When I start the Ubuntu LiveCD and my keyboard or mouse isn't detected that is very annoying. We cannot expect people to know shortcut keys to start a mouse, or how to turn the on-screen keyboard on.
Aiden just got back from a LAN party and left his keyboard there. We start a virtual keyboard so he can send a message on Pidgin to his friends to get his keyboard back.
Sharon just got back from a LAN party and left her mouse there. We start MouseKeys so she can navigate to Pidgin to ask her friends to get her mouse back.
Bert is testing a liveCD and the keyboard isn't detected by the kernel for some silly reason. We launch a virtual keyboard so Bert can debug.
We assume every user and device wants/needs a pointer and keyboard. Some users might not... What should we do for them? Ubuntu Mobile might have to turn this off?
There isn't a better place to put this log, like Upstart or Hal?
A file say 91-no-input-recovery is placed in /etc/X11/Xsession.d/ where it performs necessary logic to determine if a keyboard or mouse is present and then start a virtual one.
Currently this might only require a single file in /etc/X11/Xsession.d/
Something like (does work):
#!/bin/sh # If zero no keyboard, if non-zero hopefully there is one bool_keyboard=`xinput list --short | grep "XExtensionKeyboard" -c` #bool_keyboard=0 # If zero no mouse, if non-zero hopefully there is one bool_mouse=`xinput list --short | grep -v "emul" | grep "XExtensionPointer" -c` #bool_mouse=0 bool_any=`expr $bool_mouse + $bool_keyboard` if [ $bool_any = 0 ] then zenity --warning --title="No Input Devices Detected" --text="No Input Devices Detected, please plug some in" else if [ $bool_keyboard = 0 ] then zenity --question --title="No Keyboard Detected" --text="Would you like an onscreen keyboard?" --ok-label="Launch Onscreen Keyboard" --cancel-label="Do Nothing" if [ $? = 0 ] then onboard & fi fi if [ $bool_mouse = 0 ] then zenity --question --title="No Mouse Recovery" --text=" No mouse has been detected Here are some keyboard hints to help you out: Alt-F1 - Brings up the Applications Menu Alt-F2 - Brings up the Run Applications Window Alt-Tab - Move between Windows Tab - Navigate through fields/options Arrow Keys - Navigate through fields/options Ctrl-Alt-D - Minimizes All Windows and moves cursor to desktop In System - Preferences - Keyboard there is an option to use the numberpad as a mouse. We can do that for you, if you like. " --ok-label="Launch Mouse Keys Configuration" --cancel-label="Do Nothing" if [ $? = 0 ] then gnome-keyboard-properties & fi fi fi
- Keyboard, No Mouse
- Mouse, No Keyboard
- No Keyboard, No Mouse
BoF agenda and discussion
Best to make the dialog magically go away when the user plugs in the device that's missing as well. ScottRitchie