Re: Capturing and sending keys {Esperanto}

2007-06-27 Thread Thomas Jollans
AJK wrote:
 Hello there!
 
 I've been googleing yet, and suppose it's hopeless to try, but better
 ask it...
 
 I want to write a program which turns Cx to Ĉ, cx to ĉ et al WHILE
 TYPING. (i.e. converting Esperanto x-system to real hats, for those
 who know about this.) Therefore I though will need to capture the last
 2 typed characters (from any application), send a double backspace and
 after that send the correct letters (back to the same application)...
 
 However, it seems inpossible to capture those letters, and maybe to
 send them too...

I'm not quite sure what you want to do. Is this in a Tkinter application
or somthing like that ? Do you want this to be hooked into some layer of
some operating system to work universally ? Which operating system ?

Thomas Jollans



signature.asc
Description: OpenPGP digital signature
-- 
http://mail.python.org/mailman/listinfo/python-list

Capturing and sending keys {Esperanto}

2007-06-25 Thread AJK
Hello there!

I've been googleing yet, and suppose it's hopeless to try, but better ask it...

I want to write a program which turns Cx to Ĉ, cx to ĉ et al WHILE
TYPING. (i.e. converting Esperanto x-system to real hats, for those
who know about this.) Therefore I though will need to capture the last
2 typed characters (from any application), send a double backspace and
after that send the correct letters (back to the same application)...

However, it seems inpossible to capture those letters, and maybe to
send them too...

Or am I wrong?

Greetings,

LaPingvino

(project: http://code.google.com/p/iksilo/ - SVN Repository is free
viewable, project is GPL)

-- 
Ĉar Dio tiel amis la mondon, ke Li donis Sian solenaskitan Filon, por
ke ĉiu, kiu fidas al li, ne pereu, sed havu eternan vivon.
-Johano 3:16, La sankta Biblio-

Ĝoju ĉiam, preĝu senĉese, pri ĉio donu dankon.
-1 Tesalonikanoj 5:16-18a, La sankta Biblio-
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Capturing and sending keys {Esperanto}

2007-06-25 Thread kyosohma
On Jun 25, 8:26 am, AJK [EMAIL PROTECTED] wrote:
 Hello there!

 I've been googleing yet, and suppose it's hopeless to try, but better ask 
 it...

 I want to write a program which turns Cx to Ĉ, cx to ĉ et al WHILE
 TYPING. (i.e. converting Esperanto x-system to real hats, for those
 who know about this.) Therefore I though will need to capture the last
 2 typed characters (from any application), send a double backspace and
 after that send the correct letters (back to the same application)...

 However, it seems inpossible to capture those letters, and maybe to
 send them too...

 Or am I wrong?

 Greetings,

 LaPingvino

 (project:http://code.google.com/p/iksilo/- SVN Repository is free
 viewable, project is GPL)

 --
 Ĉar Dio tiel amis la mondon, ke Li donis Sian solenaskitan Filon, por
 ke ĉiu, kiu fidas al li, ne pereu, sed havu eternan vivon.
 -Johano 3:16, La sankta Biblio-

 Ĝoju ĉiam, preĝu senĉese, pri ĉio donu dankon.
 -1 Tesalonikanoj 5:16-18a, La sankta Biblio-

I've never done this before, but theoretically, you should be able to
have a separate process monitor what you're typing and maybe do edits
in real time. At least, I assume that that is how MS Word works. I
have messed a little with sendkeys though. Here's the examples I found
on the net:

http://mail.python.org/pipermail/python-list/1999-May/003244.html
http://aspn.activestate.com/ASPN/Python/Cookbook/Recipe/65107
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/4b032417-ebda-4d30-88a4-2b56c24affdd.asp

The msdn one is just the MS docs for Sendkeys.

One other alternative would be to type it all out and then run a
script to parse your document and basically just do a search and
replace.

Hopefully that helps your out a little at least.

Mike


-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Capturing and sending keys {Esperanto}

2007-06-25 Thread Jakub Stolarski
On Jun 25, 3:26 pm, AJK [EMAIL PROTECTED] wrote:
 Hello there!

 I've been googleing yet, and suppose it's hopeless to try, but better ask 
 it...

 I want to write a program which turns Cx to  , cx to   et al WHILE
 TYPING. (i.e. converting Esperanto x-system to real hats, for those
 who know about this.) Therefore I though will need to capture the last
 2 typed characters (from any application), send a double backspace and
 after that send the correct letters (back to the same application)...

 However, it seems inpossible to capture those letters, and maybe to
 send them too...

 Or am I wrong?

 Greetings,

 LaPingvino

 (project:http://code.google.com/p/iksilo/- SVN Repository is free
 viewable, project is GPL)

 --
  ar Dio tiel amis la mondon, ke Li donis Sian solenaskitan Filon, por
 ke  iu, kiu fidas al li, ne pereu, sed havu eternan vivon.
 -Johano 3:16, La sankta Biblio-

  oju  iam, pre u sen ese, pri  io donu dankon.
 -1 Tesalonikanoj 5:16-18a, La sankta Biblio-

Under *nix it's easier to change xkb keymap.

If you interested only in gtk applications then there is gtk-im-extra
[1], which you can use to input cxapeloj. You can also look at scim
[2] sources. It supports gtk, qt and standard x applications.

Bonsxancon!

[1] http://gtk-im-extra.sourceforge.net/
[2] http://www.scim-im.org/

-- 
http://mail.python.org/mailman/listinfo/python-list