[질문] Window 안에 있는 Widget 정보

sshim07의 이미지

Keyboard 및 Mouse가 연결되지 않고 Keypad라는 H/W로 RS-232 통신하기에

가상Keyboard로 제어를 하려면 Widget 정보를 알아야만 직접 제어가 가능합니다.

OS상에 열려있는 프로그램 즉 Window 정보는 알아 올 수 있는데

그 Window을 구성하고 있는 Widget 정보를 알아 오는 방법

또는 명령어 를 알고 싶습니다.

bushi의 이미지

동문서답이지만... 안타까운 마음에.

RS232 로 연결된 장치라해도 키보드 드라이버를 만들어 사용하는 것에 아무 문제 없습니다.
커널의 "Serial port line discipline" 을 사용하는 RS232 키보드 구현은 많습니다만,
가장 유명한게 Palm, iPaq 악세사리 중 하나인 stowaway RS232 키보드의 드라이버 입니다.
( drivers/input/keyboard/stowaway.c )

장치(/dev/ttyS0) 를 커널의 serio 에 attach,detach 하는 것은 유저모드 프로그램에서 합니다.
필요할 때만 ttyS0 를 키보드/마우스 처럼 사용하는 것이 얼마든 가능합니다.

[bushi@rose ~]$ /usr/sbin/inputattach --help
 
Usage: inputttach <mode> <device>
 
Modes:
  --sunkbd        -skb   Sun Type 4 and Type 5 keyboards
  --lkkbd         -lk    DEC LK201 / LK401 keyboards
  --vsxxx-aa      -vs    DEC VSXXX-AA / VSXXX-GA mouse and VSXXX-AB tablet
  --spaceorb      -orb   SpaceOrb 360 / SpaceBall Avenger
  --spaceball     -sbl   SpaceBall 2003 / 3003 / 4000 FLX
  --magellan      -mag   Magellan / SpaceMouse
  --warrior       -war   WingMan Warrior
  --stinger       -stng  Gravis Stinger
  --mousesystems  -msc   3-button Mouse Systems mice
  --sunmouse      -sun   3-button Sun mice
  --microsoft     -bare  2-button Microsoft mice
  --mshack        -ms    3-button mice in Microsoft mode
  --mouseman      -mman  3-button Logitech and Genius mice
  --intellimouse  -ms3   Microsoft IntelliMouse
  --mmwheel       -mmw   Logitech mice with 4-5 buttons or wheel
  --iforce        -ifor  I-Force joysticks and wheels
  --h3600ts       -ipaq  Ipaq h3600 touchscreen
  --stowawaykbd   -ipaqkbd  Stowaway keyboard
  --ps2serkbd     -ps2ser PS/2 via serial keyboard
  --twiddler      -twid   Handykey Twiddler chording keyboard
  --twiddler-joy  -twidjoy  Handykey Twiddler used as a joystick
 
[bushi@rose ~]$ 
[bushi@rose ~]$ rpm -qf /usr/sbin/inputattach 
gpm-1.20.1-89.fc8
[bushi@rose ~]$ 

커널 드라이버를 작성해서 사용하기가 어려운 환경인가요 ?

OTL