Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Share keyboard over network as separate device?

Sort of like a poor man's keyboard sharing. I've tried using Synergy and x2x but couldn't get them to work, so I decided to simplify things and use xdotool to generate the events.

Is there any way to get the keysyms (such as Control_L, F4, Shift_R) of keystrokes so they can be passed on to xdotool?

I've looked at xev but it generates so much information and I have no idea how to extract the info I need (which key was pressed, whether it is being held down, etc.) more or less in real time.

share|improve this question

marked as duplicate by Ulrich Dangel, Renan, jasonwryan, Mat, Kevin Sep 24 '12 at 1:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

What do you want to do? ssh to two computers, type once and get the result on both computers? – Nils Sep 1 '12 at 20:05
More like controlling one computer with the other's keyboard. I tried Synergy, but couldn't get it to work. – Splooshie123 Sep 2 '12 at 1:25

I'm not sure I understand your question, but

xinput test <id>

Prints the events generated by input device <id> (see xinput list to figure out ids)

xev | sed -n '/^KeyPress/{n;n;s/.*, \(.*\)).*/\1/p;}'

will return the keysym pressed in the xev window.

xmodmap -pk

will print mappings between keycodes and keysyms.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.