There’s an App to Use Your Phone as a Mouse and Keyboard
It’s not exactly a magic wand, but Mobile Mouse Pro comes pretty close.
This app lets you control your computer using your smartphone as a remote mouse and keyboard. It uses the accelerometer in your phone so you can wave it in the air and move the mouse pointer on your computer screen. If you prefer, you can use your phone’s screen as a touchpad or call up the on-screen keyboard to type in some text.
Note: In order to make it work you also have to install special client software on your computer.
Compatible with: iOS, Android