私は現在、プログラム 'matchbox-keyboard'(http://matchbox-project.org/)で発生している問題をデバッグしようとしています。いくつかの支援のために。 matchbox-keyboardは、タッチスクリーンキオスクで現在使用しているオンスクリーンキーボードです。ユーザーが検索などを行うための基本入力を入力できるようにしています。少し古いかもしれませんが、アプリケーションには理想的です軽量の「オンデマンド」キーボード(つまり、必要なときにのみ表示されます)は、デバイスで使用しているマッチボックスウィンドウマネージャとうまく機能します。ただし、キオスクにアクセスする必要があるサイトの1つは、ユーザーが一時的にログインする必要があり、何らかの理由でユーザーがパスワードフィールドをクリックするたびにオンスクリーンキーボードが消えます。パスワードフィールドを入力する際の検出方法
ユーザーが訪れなければならないサイトは変更できないので、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がいつ'_MB_IM_INVOKER_COMMAND'タイプで、実際にデータ値を設定する方法です。具体的には、パスワードフィールドを入力すると、どのようにしてxevent->xclient.data.l[0]
の値を2(MBKeyboardRemoteHide
)に設定するのか。
私はここで述べた重要なオブジェクトへの参照と、Xlib Eventsのガイドをここで読んでいます:http://tronche.com/gui/x/xlib/events/とグーグルで答えを探してみましたが正直言ってこれはほんの少しです私はこの問題を理解することができません。この時点で、私のキオスクプロジェクトの必要性から脱却し、私のところでは好奇心が増していきました。最も感謝しています。
==========更新==========
さらなる試験/情報:
問題は、前述したように、特定のブラウザの実装ではありません。私は望みのウェブサイトだけでなく、ゲッコーブラウザ(Firefox)、ウェブキットブラウザ(ミドリ)、そして両方のブラウザ、両方のページで、テキストフィールドとパスワードフィールドのみを持つ基本テストHTMLページを試しました。行動は同じでした。ここでは、参照用のテスト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スキルはかなり錆びているので、最高の私の情報は現時点で入手できます。
問題は、私はヤモリのブラウザ(Firefoxの)上で、私の希望のウェブサイトだけでなく、テキストのみとパスワードフィールドを持つ基本的なテスト用HTMLページを試みたとして、特定のブラウザの実装のように見えるだけでなく、しません。 Webkitブラウザ(Midori)、両方のブラウザでは、両方のページで、動作は同じでした。私の質問を編集して詳細情報を追加する。 – Andrew