View Single Post
Old 05-26-2012, 11:24 PM   #28
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 704
Karma: 2290994
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
KT on-screen keyboard isn't a Java application. It's a native compiled application. It sends X events to currently active window.

So potentially it could be used with XTerm (and any other X application).

Keyboard layouts are simple JSON files (gzipped in 5.1.0). X keysyms could be used in a keyboard layout (i.e. cursor keys, control keys etc). A little more information could be found in another thread.

Keyboard could be shown with:
Code:
lipc-set-prop -s com.lab126.keyboard open com.example.xterm:abc:1
and then closed with
Code:
lipc-set-prop -s com.lab126.keyboard close com.example.xterm
com.example.xterm is an unique identificator of application requesting to show keyboard. abc is a keyboard sub-layout (it could be abc, web or 123). 1 is a flag for whatever I don't know precisely.

Unfortunately, KT keyboard doesn't working with XTerm from this thread. Keyboard send X events of key presses to XTerm window, XTerm receives them (I see it in debug level logs of keyboard application and xev output for XTerm window). But XTerm doesn't display sent characters. I didn't dig any further.

UPD Full list of keyboards sub-layouts (as for 5.1.0): abc, Abc, 123, web, pad

Flags are:
  • 0 - DEFAULT
  • 1 - COMPOSITION_ENABLED
  • 2 - AUTOCAPITALIZE
  • 4 - CLIENT_DISABLED
They coud be unioned through binary OR (for example, flag 3 will enable both COMPOSITION_ENABLED and AUTOCAPITALIZE, as 3 = 1|2). Unfortunately, I don't know meaning of these flags except their's naming from decompiled code.

Last edited by eureka; 06-01-2012 at 08:34 PM. Reason: full list of names of flags and keyboard sub-layouts
eureka is offline   Reply With Quote