현재 'matchbox-keyboard'(http://matchbox-project.org/) 프로그램에서 겪어 본 문제를 디버그하려고하고 있습니다. 도움이 필요하시면. matchbox-keyboard는 터치 스크린 키오스크에서 현재 사용중인 온 스크린 키보드로 사용자가 검색 등을 수행 할 때 기본 입력을 입력 할 수 있도록 허용합니다. 조금 오래되었을 수도 있지만 그럼에도 불구하고 내 응용 프로그램에 이상적입니다. 가벼운 무게의 '주문형'키보드 (즉, 필요할 때만 나타남)는 장치에서 사용중인 matchbox-window-manager와 잘 작동합니다. 그러나 키오스크가 방문해야하는 사이트 중 하나는 사용자가 일시적으로 로그인해야하며 사용자가 암호 필드를 클릭 할 때마다 화면 키보드가 사라집니다.암호 입력시 탐지 방법
사용자가 방문해야하는 사이트는 변경할 수 없으므로 matchbox-keyboard를 패치하여이 동작을 변경하려고 시도했습니다.
typedef enum {
MBKeyboardRemoteNone = 0,
MBKeyboardRemoteShow,
MBKeyboardRemoteHide,
MBKeyboardRemoteToggle,
} MBKeyboardRemoteOperation;
=============
void
mb_kbd_remote_init (MBKeyboardUI *ui)
{
Atom_MB_IM_INVOKER_COMMAND = XInternAtom(mb_kbd_ui_x_display(ui),
"_MB_IM_INVOKER_COMMAND", False);
}
이 아톰을 다음과 같이이를 위해, 나는 다시 코드에 정의 된 사용자 정의 아톰에 문제를 추적했다 그런 다음 Xevents를 검사 한 다음 xevent (xevent->xclient.data.l[0]
)의 데이터를 사용하여 키보드를 넣을 상태를 결정합니다. 알아낼 수없는 것은 Xevent가 가정 될 때 X 디스플레이가 어떻게 알 수 있습니까? '_MB_IM_INVOKER_COMMAND'유형이되고 실제로 데이터 값을 설정하는 방식입니다. 특히 암호 필드를 입력 할 때 how/why가 xevent->xclient.data.l[0]
의 값을 2 (MBKeyboardRemoteHide
)로 설정합니다.
내가 여기 가이드에서 Xlib의 이벤트에 독서뿐만 아니라, 여기에 언급 된 중요한 객체에 대한 참조에 대한 코드를 수색 시도 : http://tronche.com/gui/x/xlib/events/ 및 구글에 대한 답을 찾고 있지만, 솔직히 이것은 단지 조금 이상 내 머리, 나는 그 문제에 대해 이해할 수 없다. 이 시점에서 내 키오스크 프로젝트의 필요성에서 벗어나 내 마음에 호기심이 생기고 (누군가가 나를 알아낼 때까지 내 마음을 바꿀만한 무언가가 됨) 누군가가 내가 어떤 답을 얻을 수 있도록 도울 수 있다면, 나는 가장 감사합니다.
========== 업데이트 ==========
또한 테스트/정보 :
문제는 다음과 같이 브라우저 구현에 구체적으로 표시되지 않습니다 필자는 원하는 웹 사이트뿐만 아니라 텍스트 및 암호 필드가있는 기본 테스트 HTML 페이지, 도마뱀 브라우저 (Firefox), 웹킷 브라우저 (Midori) 및 두 브라우저 모두, 두 페이지 모두에서 테스트했습니다. 그 행동은 똑같습니다. 여기에 참조 할 수 있도록 테스트 HTML 페이지의 : 필드를 클릭함으로써
<head>
</head>
<body>
<form>
Name: <input type="text" name="firstname"><br>
PW: <input type="password" name="lastname">
</form>
</body>
</html>
암호 필드가 의도적으로 어떤 이유로 초점을 거부 나에게 나타납니다이 직접 GTK-IM 방법 포커스 아웃 호출되도록 . 내 의심은 그것이 아마도 GTK 구현의 일부이며 아마도 암호 필드가 일반적으로 '숨겨져있다'는 행위와 관련 될 수 있습니다. 아마도이 기능은 주문형 클립 보드가 암호 나 그와 같은 것을 저장하는 것을 막기 위해 수행됩니까?
암호 필드 및 텍스트 필드를 클릭하면 이벤트 목록/디버그 출력을 검사 할 때 각 필드 유형에 대해 수신 된 이벤트 목록은 매우 유사합니다. 많은 이벤트가 같은 유형이지만, 아직 해독하려고 시도하는 몇 가지 차이점이 있습니다.나는 이벤트 번호는이 상황에서 대부분의 의미가 알고 있지만, 그림을 위해, 여기에 비 암호 필드에 대한 다른 이벤트의 목록입니다 :
matchbox-keyboard-remote.c:47,mb_kbd_remote_process_xevents() got a message of type _MB_IM_INVOKER_COMMAND, val 1
matchbox-keyboard-ui.c:560,mb_kbd_ui_redraw() mark
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 69206018
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 69206018
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 69206018
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 37748776
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 35651628
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 35651629
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 35682433
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 69206018
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 69206018
및 암호 필드 :
matchbox-keyboard-remote.c:47,mb_kbd_remote_process_xevents() got a message of type _MB_IM_INVOKER_COMMAND, val 2
matchbox-keyboard-ui.c:1230,mb_kbd_ui_event_loop() Hide timed out, calling mb_kbd_ui_hide
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 69206018
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 69206018
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 69206018
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 35651628
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 35682433
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 35665943
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 39845918
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 35651628
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 35651629
matchbox-keyboard-remote.c:38,mb_kbd_remote_process_xevents() got a message, type 35682433
불행하게도 이것은이다 나의 C 기술은 아주 녹슨 것이기 때문에 최고의 순간에 내 정보를 얻을 수 있습니다.
해당 웹 사이트뿐만 아니라 텍스트 및 암호 필드가있는 기본 테스트 HTML 페이지, 도마뱀 브라우저 (Firefox), Firefox 및 기타 브라우저를 사용하여 문제가 브라우저 구현과 관련이없는 것 같습니다. 웹킷 브라우저 (미도리), 두 브라우저 모두에서 두 페이지 모두 동작이 동일했습니다. 추가 정보를 포함하도록 내 질문 수정 – Andrew