View Single Post
Old 11-09-2012, 01:02 PM   #26
choff
Member
choff walks where angels fear to fly.choff walks where angels fear to fly.choff walks where angels fear to fly.choff walks where angels fear to fly.choff walks where angels fear to fly.choff walks where angels fear to fly.choff walks where angels fear to fly.choff walks where angels fear to fly.choff walks where angels fear to fly.choff walks where angels fear to fly.choff walks where angels fear to fly.
 
Posts: 12
Karma: 152738
Join Date: Jul 2010
Device: Kindle DXG
Using LIPC insertKeystroke property

Hello,

after reading though this thread, I decided to get familiar with this topic myself. The insertKeystroke thing seemed promising, so I decided to give it a try.

And indeed it does work now!

Why is this?

The problem is that insertKeystroke is not an event, but a property. This thought occured to me after reading the help output of lipc-probe, where it says:
Quote:
lipc-probe [OPTIONS] [<service_name>] [<service_name>] ...
With no options, it probes the service. It prints a list of properties offered by that service
So in order to insert a keystroke into the framework, lipc-set-prop has to be invoked.

In order to inject a keystroke into the framework, lipc-set-prop has to be called with the following parameters:

Quote:
lipc-set-prop -i -- com.lab126.framework insertKeystroke [keycode]
, where keycode is the ASCII keycode of the key that you want to inject.

E.g. to inject the letter "g" into the framework, try the following command:

Quote:
lipc-set-prop -i -- com.lab126.framework insertKeystroke 103
This should print the letter "g" into the active text field.

Some other thing that I noticed:

In some cases, the Java keyboard has to be opened before you can insert any keystrokes.

This is especially true for the browser. Here, the Java keyboard has to be opened before you can type texts into text boxes.

Now that the insertFramework stuff has been done, we still need a way to pass keystrokes from the keyboard into the insertKeystroke property of the framework.

Probably some sort of C program is required to accomplish this. I will investigate tomorrow.

Regards,

Chris
choff is offline   Reply With Quote