Laptop Keyboard to Desktop PC

Discuss how to write good code, break bad code, your current pet projects, or the best way to approach novel problems

Laptop Keyboard to Desktop PC

Post by canbees on Tue Mar 27, 2012 7:06 am
([msg=65238]see Laptop Keyboard to Desktop PC[/msg])

So my screen died i dont have that much money to spend so i bought a USB-cable(A) and thought *topic*.
I looked around the net for something but didnt find anything concrete.

So my idea is that i will just write to the Output of the USB cable and connect it to the desktop. Well that will be easy to do i think but how does the desktop recognize that its a keyboard?, or just does it work as an Interrupt in the hardware?
I've had some experience with assembler and hardware programming(CycloneII) so i was thinking just going at it that way.
I've written Interrupthandlers for keyboard and other I/O.

ty
ps. will look rly awesome if it works :D

pss. Putty?
canbees
New User
New User
 
Posts: 11
Joined: Wed Mar 07, 2012 2:02 pm
Blog: View Blog (0)


Re: Laptop Keyboard to Desktop PC

Post by centip3de on Tue Mar 27, 2012 10:46 am
([msg=65239]see Re: Laptop Keyboard to Desktop PC[/msg])

canbees wrote:So my screen died i dont have that much money to spend so i bought a USB-cable(A) and thought *topic*.
I looked around the net for something but didnt find anything concrete.

So my idea is that i will just write to the Output of the USB cable and connect it to the desktop. Well that will be easy to do i think but how does the desktop recognize that its a keyboard?, or just does it work as an Interrupt in the hardware?
I've had some experience with assembler and hardware programming(CycloneII) so i was thinking just going at it that way.
I've written Interrupthandlers for keyboard and other I/O.

ty
ps. will look rly awesome if it works :D

pss. Putty?


You'll have to write a program that captures all of your key-presses on your laptop, connects to the correct USB serial, and sends the information (most likely will want to do this one key-press at a time) to the corresponding receiving program on your PC. Then, a program on your PC (most likely should be a device driver, so that it gets recognized, and treated like an actual key-press) will have to decipher each key-press, and treat it like you would a normal key-press on a normal computer. This is fairly advanced programming, and will require some intense ASM. And judging off of your previous posts, might be a little too advanced for a beginning programmer such as yourself. While I'm not trying to deter you at all, I'm just saying you may find that a remote-desktop client is easier, and will still get the desired effect.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rick Cook
User avatar
centip3de
Moderator
Moderator
 
Posts: 1449
Joined: Fri Aug 20, 2010 5:46 pm
Blog: View Blog (0)


Re: Laptop Keyboard to Desktop PC

Post by LoGiCaL__ on Tue Mar 27, 2012 12:14 pm
([msg=65241]see Re: Laptop Keyboard to Desktop PC[/msg])

Couldn't you just hook up a desktop screen to the laptop, press fn + f8 (depending on laptop) and just use it like a regular pc. Unless I missed something. Are you trying to go about this by writing a program?

From the description you gave, I'm picturing your laptop screen went, but other than that it still works.
User avatar
LoGiCaL__
Addict
Addict
 
Posts: 1063
Joined: Sun May 30, 2010 12:33 pm
Blog: View Blog (0)


Re: Laptop Keyboard to Desktop PC

Post by centip3de on Tue Mar 27, 2012 5:25 pm
([msg=65249]see Re: Laptop Keyboard to Desktop PC[/msg])

Or that. ^
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rick Cook
User avatar
centip3de
Moderator
Moderator
 
Posts: 1449
Joined: Fri Aug 20, 2010 5:46 pm
Blog: View Blog (0)


Re: Laptop Keyboard to Desktop PC

Post by ghost107 on Tue Mar 27, 2012 8:27 pm
([msg=65255]see Re: Laptop Keyboard to Desktop PC[/msg])

In what I remember about keyboard they have a Firmware, which on connection then send a signal of the keyboard to a port (PS2/USB), the bios(or the operating system drivers) of the PC detects and translates the signal into a keyboard device.

Just connect Data+(Green) to the clock, data-(white) to the data, and gnd(black) with gnd, VDC(red) with VDC. You would require micro controller(18F PIC, or an AVR, or M68HC08, using the HID interface) to receive some ascii values from 1 computer and convert them to keyboard codes.

Still requires a lot of work, and USB communication isn't that easy when you are working with microcontrollers, is the same as hard as connecting to a controller thru a Ethernet cable(a lot of microcontroller assembly language, maybe C if your using a C compiler).

If your laptop works fine you could try to install a VNC server and use it remotely.

http://www.freescale.com/files/microcon ... DRM014.pdf
http://retired.beyondlogic.org/keyboard/keybrd.htm
ghost107
Poster
Poster
 
Posts: 132
Joined: Wed Jul 02, 2008 7:57 am
Blog: View Blog (0)


Re: Laptop Keyboard to Desktop PC

Post by canbees on Wed Mar 28, 2012 5:21 pm
([msg=65286]see Re: Laptop Keyboard to Desktop PC[/msg])

well, ty for response did little more reading and
VGA, HDMI are all read only so just hooking up screen and pressing key wont work.
You have to redirect it by yourself in the hardware wich i want to do but dont want to destroy my last screen if it would come to that and then you need to add a switch to change between the computers. This might be more of a summerproject

But the keyboard is possible for now USB seems to be using some kind of protocol but yah alot of work. The USB even got an Interrupt Transfer.
I've written the code for the keyboard in C so far atleast.

http://www.beyondlogic.org/usbnutshell/usb1.shtml < If you want something to read :P
canbees
New User
New User
 
Posts: 11
Joined: Wed Mar 07, 2012 2:02 pm
Blog: View Blog (0)



Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests