send characters to current window


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users send characters to current window
# 1  
Old 05-31-2008
send characters to current window

Before I re-invent the wheel...

I have written an on-screen keyboard & handwriting input client in Java (spare me please, I get paid to write Java and it will take some time to get back up to speed in C & X11).

In order to concentrate on the other bits, I took advantage of a hack that uses the '-text' facility of the estimable XVkbd package to actually send the recognized text to X11. My client does not accept the focus, so the text is sent to the focused window.

The Java client only sends a character, rather than the 'keydown-keyup' pair X11 uses, so Java latency isn't an issue, but I nevertheless get repeat characters - like a key was held down. I'm assuming this is from my misuse of XVkbd, spawned from the Java session.

I can rip up the XVkbd code to make something, but I will feel silly when someone points out that there is already an app or a library call that does this, or could easily be made to do this:

1) Accept a unicode character or string.
2) Put that to the X11 server definitively (little or no lag between 'keydown' and 'keyup').

An existing daemon or library call that can be wrapped with a daemon and spoken to over dbus would be good - something I can 'nice' to -5 perhaps, so that it just happens. User input on a tablet computer (what I'm writing for) isn't likely to be so rapid as to overwhelm the system.

I am aware of the Escher-X11 Java project, and that's no good - it doesn't avoid the possibility that the system will be too busy between times it gets around to running the JVM thread. Definitive at the system level is what's important here, so this aspect can be solved, and I/we can get on with writing Tablet support for Linux/Unix.

Thanks in advance for any help.

Cheers,
Bret
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Send current script to background

Hi scripters, I'm quite used to run commands in the background using & like in: $ myscript &But this is NOT what I'm trying to do today. What I'm trying to achieve is to run a script the normal way (without &), have my script do a little checkup and then jump to background. Something like:... (5 Replies)
Discussion started by: chebarbudo
5 Replies

2. Shell Programming and Scripting

How to send a file in UNIX through email which is created only 15 minutes before the current time?

I wanted to send an email to the client whenever there is failed record created in a /feed/HR-76/failed folder after processing of feed file. I can find out with the help of below script that what is the new file created but that file didn't make just 15 minutes before. ... (1 Reply)
Discussion started by: puneetkhullar
1 Replies

3. UNIX for Beginners Questions & Answers

Toggle between xterm window and standard terminal window

Is it possible to toggle back and forth between an xterm invoked from one tty, and a shell invoked from a different tty? I am running Centos 7 with KDE and booting in non-graphic mode. After logging in on the default window (/dev/tty1) , I can then use ALT-F2 to access a new window (/dev/tty2),... (1 Reply)
Discussion started by: rhgscty
1 Replies

4. Shell Programming and Scripting

Perl to send previous and current value

For example, I have a file called number.txt. x y 1 1 2 4 3 9 4 6 5 5 6 6 7 9 8 4 9 1 10 0 ... And I want to print out the value of x and y, if y%4==0 and the next value of y%4==0. Thus, the sample output is: 1 1 *because the previous x before 2 is 1 2 4 *because 4%4 == 0 7 9... (2 Replies)
Discussion started by: Tzeronone
2 Replies

5. Shell Programming and Scripting

can i send shell commands to a open window

i want to write a script that automatically fills in a form and pushes a few buttons. can i do that with bash or something similar? (1 Reply)
Discussion started by: magiling
1 Replies

6. Programming

Resize current window with Curses

Hi. I am beginning with Unix C Curses Library and i would like to know if it's possible to resize my current window. In other words, i am working with a Putty Client over my Windows system and with a telnet/ssh connection to linux. I want to build a small linux application using C Curses... (10 Replies)
Discussion started by: pogdorica
10 Replies

7. Red Hat

Maximizing X window without Window Switcher

Hi everyone! I have a strange situation. I'm running an NX remote Gnome desktop session. On the remote machine, there is a whole load of unsaved data in a window. A problem that I've been having with this NX session is that I can't load Gnome Applets, including the Window Switcher. So.. when I... (0 Replies)
Discussion started by: alexandicity
0 Replies

8. UNIX for Advanced & Expert Users

send attachments using send mail in Solaris

Hi All, I have a requirement to send and email of body html with an attachment. concatinating uuencode output to the mail body with mailx command works, but as my Email body is of HTML type i use sendmail. my command to send HTML body is as below: export MAILTO="recipient@domain.com"... (1 Reply)
Discussion started by: mohan_kumarcs
1 Replies

9. Shell Programming and Scripting

How to send AT commands after getting into Kermit window?

We're using Kermit 8.0.209 in Linux environment. We're trying to invoke kermit from an application, send some AT commands and receive the responses from the End terminals like mobiles/modems. We access these deivces through serial ports. For eg., to send a file we use command-line options like... (4 Replies)
Discussion started by: pratiul
4 Replies

10. Windows & DOS: Issues & Discussions

window 2000 professional not pinging my window 98 system.

Hello, We someone help me resolve this problem. I have window 2000 professional, windows 98 and Unixware 7.0.1 on the network. I was able to establish connection with all. However, l was unable to ping window 98 from window 2000 professional. I was able to ping the window 2000 from the window... (10 Replies)
Discussion started by: kayode
10 Replies
Login or Register to Ask a Question