nanogui: Support for on-screen keyboard
Subject:
Re: Support for on-screen keyboard
From:
Vidar Hokstad ####@####.####
Date:
15 May 1999 17:33:25 -0000
Message-Id: <Pine.LNX.4.10.9905151916450.2715-100000@a.ncg.net>
On Sat, 15 May 1999, Alexander Peuchert wrote:
> Okay, but how could this look for the user ? If he clicks on a textfield,
> it will get the keyboard focus. So, the screen-keyboard will get the focus
> everytime you type something on it ...
>
> How do you plan to figure out the reciever of the screen-keyboard events...
>
> I see more API here.
Ok, here's a step by step walkthrough (this should work for both my
initial suggestion, and Alex's suggestion):
- The user click the text field.
Either the widget set does a call to set this as the default target
(my initial suggestion), or Nano-X records the current window
for later retrieval (Alex' suggestion)
- The user move pointer to the on-screen keyboard.
With Alex suggestion, the on-screen keyboard would then on mouse-enter
retrieve the id of the last clicked window.
- The user click on whatever "keys" on the on-screen keyboard he wants
to. Both with Alex' and my suggestions the on-screen keyboard would
then call the function to generate a key event, either with the
default target (my suggestion), or with the ID retrieved in step
2 (with Alex' suggestion).
In both cases, only two calls would be required. For mine, it would be
something like:
SetKeyEventTarget(windowid)
SendKeyEvent(....)
With Alex' suggestion, it would be something like:
windowid = GetLastFocusedWindow()
SendKeyEvent(...)
I think Alex' suggestion is cleaner than mine, as it would work with any
widget set without modification.
Regards,
Vidar