frank26080115
Posts: 13
Joined: Sun Apr 15, 2012 5:14 am
Contact: Website

Re: Using Laptop as keyboard and mouse

Sun Apr 15, 2012 6:18 am

So, I own just one laptop and one monitor that I use to extend my laptop. So I envision myself working on Raspberry Pi projects using the monitor right beside my laptop most of the time. I think it'll be great if I can avoid having to buy another keyboard and mouse in order to operate the Raspberry Pi by using my laptop.

I am totally capable of creating a device that will do this for me. I would create a double ended USB device, one end with behave as an USB keyboard and mouse combo device, while the other end receives commands from the laptop. It'll be all open source, probably a combination of V-USB code with one/two ATtiny4313 or LUFA code with one/two ATmega32u4. To me this stuff will be a walk in the park.

But before I begin on this project, does a similar solution already exist? I don't want to waste time to reinvent something. I am aware of existing programs that will do this through a network, but I don't want to use them because the Raspberry Pi may not always be connected to a network.

If no such solution already exist, then is anybody else interested in my own double-ended USB solution? Is there any interest in it being a solder-it-yourself kit? Is there any interest in a complete ready-to-go-out-of-the-box product? Or should I just do it quick and dirty (think perfboard with wires instead of a PCB)?

Thor_sonofodin
Posts: 1
Joined: Sun Apr 15, 2012 12:05 pm

Re: Using Laptop as keyboard and mouse

Sun Apr 15, 2012 1:36 pm

Sounds all good if you can do it, but seems a bit of a 'Heath Robinson' approach just to get your Pi working when you can pick up a basic keyboard and mouse very cheaply these days.

I'm just going to hook up the Pi basically to start with and get familiar with it.

Good luck with it, be interesting to see your results.

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: Using Laptop as keyboard and mouse

Sun Apr 15, 2012 8:59 pm

This is a very roundabout solution.

Much easier is to connect the RPi to the laptop using a simple Ethernet cable and use VNC software for remote control.

Chris.Rowland
Posts: 239
Joined: Thu Jan 12, 2012 5:45 pm

Re: Using Laptop as keyboard and mouse

Sun Apr 15, 2012 9:24 pm

Doesn't Synergy provide a way to share a mouse and keyboard between several systems?

It seems to be in the armel Debian distribution so may need nothing more than installing and configuring.

frank26080115
Posts: 13
Joined: Sun Apr 15, 2012 5:14 am
Contact: Website

Re: Using Laptop as keyboard and mouse

Sun Apr 15, 2012 10:03 pm

Right, Synergy and remote desktop both require a network connection. I think some of my projects will not involve networking, which is the problem I'm trying to solve.

User avatar
meltwater
Posts: 1014
Joined: Tue Oct 18, 2011 11:38 am

Re: Using Laptop as keyboard and mouse

Mon Apr 16, 2012 8:30 am

You could probably setup something similar to laplink (from the old days) which will do everything through a serial connection.

But yes, Synergy is a nice way to do things, don't forget you can always use a direct network cable between computers if you don't want to setup a full network. (the RPi lan chip will automatically deal with the crossover too, so don't even need a special cable).
______________
http://www.themagpi.com/
A Magazine for Raspberry Pi Users
Read Online or Download for Free.

My new book: goo.gl/dmVtsc

Meltwater's Pi Hardware - pihardware.com

Like the MagPi? @TheMagP1 @TheMagPiTeam

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Using Laptop as keyboard and mouse

Mon Apr 16, 2012 11:56 am

Heh heh - This thread is yet another classic instance of that old Net/onlineForum phenomenon, that goes like this:

(OP = Original Poster, FP = Forum Participants)

OP: I am planning to do X - what do you think?

FP:  You don't want to do X.  X is immoral and fattening.  Here's how to do Y instead.

OP: I don't want to do Y.  I want to do X.

FP: No, you don't.  X is illegal in most states.  Do Y instead.

OP: Y doesn't help me.  I want to do X.

FP: Here's how to do Y.  Here, I'll even help you.

OP: Arghhhhhhhh!

Having been there myself many a time, I have the utmost sympathy for the OP in these sorts of cases.

That said,  it is also true that we've been down this road before.  There was a thread a few months ago involving someone who wanted to do something (details escape me, but I think it was something similar to what is being proposed in this current thread) via USB that most of us (myself included) thought was much easier done by a network cable.  The point was also made that you can run a simple (ethernet) cable between the two machines and think of it is as just a fancy serial or USB type cable.  You don't have to think of it as "networking" if you don't want to...
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

User avatar
Burngate
Posts: 6067
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Using Laptop as keyboard and mouse

Mon Apr 16, 2012 12:25 pm

Yeah - but when model A comes out, without a network port, what then?

frank26080115
Posts: 13
Joined: Sun Apr 15, 2012 5:14 am
Contact: Website

Re: Using Laptop as keyboard and mouse

Mon Apr 16, 2012 12:29 pm

My laptop's network controller thing has a problem, it won't wake up with the rest of the computer. This means once I put it to sleep (to go to class or something), come back, the RJ-45 just won't work any more unless I reboot. But that's not the focus here.

Trust me, I know networking it is the best way to go, but hypothetically, let's say it's not there.

Chris.Rowland
Posts: 239
Joined: Thu Jan 12, 2012 5:45 pm

Re: Using Laptop as keyboard and mouse

Mon Apr 16, 2012 12:54 pm

No disrespect but something I see is that people often present a problem not as a problem but as a solution.

It's often useful to dig down and find out what the problem really is because there can be a much better solution than the one the user wants. That's where the networking suggestions are coming from, it seems like a simpler solution to the problem of using a different system's keyboard and mouse.

The obvious way using USB would be two USB to serial interfaces and a cross over cable.  Then write software on the laptop to intercept the keyboard and mouse communication and send it to the serial port. The Pi would need sortware - or hopefully just configuring - to use the serial data.

One possibility would be to set up a narrow window on each display and when the mouse is detected in that it switches the mouse and keyboard data to the other system. I did that some years ago to control a KVM switch box.

frank26080115
Posts: 13
Joined: Sun Apr 15, 2012 5:14 am
Contact: Website

Re: Using Laptop as keyboard and mouse

Mon Apr 16, 2012 1:06 pm

Honestly I'm looking for an excuse to build this project but I just don't want to do it if it"s already been done before.


set up a narrow window on each display and when the mouse is detected in that it switches the mouse and keyboard data to the other system



This can be done easily on the laptop but the Raspberry Pi side will only see a standard HID keyboard and mouse without any special drivers, so switching to the Raspberry Pi is possible but switching back to the laptop won"t be as easy. I plan on having a simple button to do the switching.

I'll consider using the serial port directly but I'd rather avoid writing any background running processes for the Raspberry Pi.

frank26080115
Posts: 13
Joined: Sun Apr 15, 2012 5:14 am
Contact: Website

Re: Using Laptop as keyboard and mouse

Wed Jul 11, 2012 4:41 am

Progress report

Image

Album of build:
http://imgur.com/a/eyjci

I'm still writing the firmware and software, but the bootloader works.

perpe
Posts: 30
Joined: Fri May 25, 2012 6:44 pm

Re: Using Laptop as keyboard and mouse

Wed Jul 11, 2012 8:57 am

Isn't Bluetooth a choice?
There are some application, that can turn your laptop into a Bluetooth mouse and keyboard, like
http://anselm.hoffmeister.be/computer/h ... ex.html.en
http://code.google.com/p/diyps3controller/
http://mulliner.org/bluetooth/xkbdbthid.php
You need only a Bluetooth dangle for the pi(most laptop have built in Bluetooth card)

Another easy way ist to use usbnet. I don't know if usbnet is activated in the pi's kernel, if not you have to recompile it. With enabled usbnet you can create a network connection between your pi and laptop over USB, this means you can use all the network applications to share what you want between the two.

frank26080115
Posts: 13
Joined: Sun Apr 15, 2012 5:14 am
Contact: Website

Re: Using Laptop as keyboard and mouse

Wed Jul 11, 2012 4:18 pm

honestly didn't know I could do that, thanks

hidclient and xkbd-bthid uses a Linux computer as the sender, but I'm on Windows, however, it's nice to know that it's possible

the PS3 thing is actually more complicated than what I am trying to do

Gotta finish what I started, this small project has been good practice for me. I've gotten libusb working this morning with a program that captures keystrokes and mouse events using user32.dll hooks, the "laptop side half of the stick" is talking to libusb but still require real testing, the Pi enumerates the "keyboard half of the stick" just fine. I've gotta make the two half of the stick talk to each other next. I'm almost done.


User avatar
jbeale
Posts: 3500
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Using Laptop as keyboard and mouse

Fri Jul 13, 2012 11:59 pm

Very nice project! Thanks for putting up the details.

shiekh
Posts: 22
Joined: Tue Dec 27, 2016 4:20 pm

Re: Using Laptop as keyboard and mouse

Sat Sep 23, 2017 4:12 pm

I'm so confused; VNC achieves this. You say because the Pi may not be connected to the network, but then just use an Ethernet cable and no network.

User avatar
B.Goode
Posts: 8917
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Using Laptop as keyboard and mouse

Sat Sep 23, 2017 4:55 pm

shiekh wrote:
Sat Sep 23, 2017 4:12 pm
I'm so confused; VNC achieves this. You say because the Pi may not be connected to the network, but then just use an Ethernet cable and no network.
Maybe there was no simple implementation of vnc for Raspbian 5 years ago, which is the age of the topic you have chosen to ressurrect.

Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

Re: Using Laptop as keyboard and mouse

Sat Sep 23, 2017 5:40 pm

Maybe there was no simple implementation of vnc for Raspbian 5 years ago, which is the age of the topic you have chosen to ressurrect.
If you go back and re-read the entire thread, carefully, from start to finish, as I just did, you will see why any networking-based solution is a no-go for the OP. It is clear that his reasons for wanting to do it this way are:
1) Because the networking port on his laptop doesn't work correctly. Details are there if you need to refer back to them.
and
2) Because he really just wants an excuse to build the thing. He's itching to do it (and has, now 5 years ago, done so).

A couple of other comments:
1) I wonder where Frank is today. Wonder if he ever reads this board anymore.
2) Great post by that Joe Schmoe guy!
If this post appears in the wrong forums category, my apologies.

User avatar
B.Goode
Posts: 8917
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Using Laptop as keyboard and mouse

Sat Sep 23, 2017 5:59 pm

I prefer Martin's response...

mlepage
Posts: 95
Joined: Tue Jun 12, 2012 1:58 am

Re: Using Laptop as keyboard and mouse

Tue Sep 26, 2017 12:53 am

I think it's awesome that Frank did eventually build this.

Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

Re: Using Laptop as keyboard and mouse

Tue Sep 26, 2017 1:14 am

mlepage wrote:
Tue Sep 26, 2017 12:53 am
I think it's awesome that Frank did eventually build this.
Indeed. One wishes that it was somehow publicly available. Would be fun to play with.
If this post appears in the wrong forums category, my apologies.

frank26080115
Posts: 13
Joined: Sun Apr 15, 2012 5:14 am
Contact: Website

Re: Using Laptop as keyboard and mouse

Tue Sep 26, 2017 3:28 am

Hi everybody

The files for have been up on my website but I moved my site years ago, the old site should have redirected, it's here http://eleccelerator.com/nehebkau-lapto ... and-mouse/ , files are up too I just checked

I built something similar after I graduated college to do a small hack/cheat on the PS4 controller over Bluetooth and Sony hired me when they saw it.

I'm not active here or play with the R-Pi very much, still sticking with microcontrollers more often than not. My rLoop team did put a bunch of Pies in our hyperloop pod though.

Return to “Other projects”