Recently, there has been some discussion about input methods among a few JPBE.net members on our forums (here, in case anyone can read Japanese).
As you may already know, Japanese users use a Japanese IME (input method) to enter text in Japanese. However, sometimes the Japanese input method gets on the way – for example, when you enter passwords that have to be in single-byte characters – and the user has to switch to the standard keyboard input. Switching of the input method is done manually by using the Alt-Space key combination.
However, other OSes apparently provide mechanisms for applications to both poll the currently enabled input method, and to switch it to a different one if/when necessary (your browser could, for example, swicth from the Japanese input method to the standard input method when clicking on a password text field).
Although the above is possible in BeOS too, it seems that there is no OS function or message that can be used to poll which input method is being used, or a function to switch the input method as necessary (at least that is what seems to transpire from their discussion).
It would be nice, therefore, if the Haiku input_server provided the following two functions:
A function to obtain the list of registered input_methods
A function to switch to an input_method by its name
The above could be in the form of a find_input_device() or get_input_devices(), or it could be done by polling through a BMessage using BMessenger and obtaining a reply. It really does not matter how it is implemented, as long as the mechanisms are there for the programmer to use them in their apps.
I thought I would pass this information along in the hope that implementation is taken into consideration. If you need any further information (or if my explanation was not clear), please feel free to ask.
it seems your need is a programatical way of change the active method.
At the moment, the libbe.so doesn’t expose such functions, but maybe it’s possible to guess what should be done.
input_server accepts BMessages. It seems BMessage with what field ‘MRsm’ are handled by a method HandleSetMethod in the input server.
A hack should be to send this type of message.
it seems your need is a programatical way of change the active method.
At the moment, the libbe.so doesn’t expose such functions, but maybe it’s possible to guess what should be done.
input_server accepts BMessages. It seems BMessage with what field ‘MRsm’ are handled by a method HandleSetMethod in the input server.
A hack should be to send this type of message.
I don’t know if this is enough though.
Hi Korli,
I am very sorry for the delay in my response, but I seem to have missed your post.
I guess what the guys at JPBE.net were hoping was a couple of new functions in the input_server so that they do not have to rely on hacks.In other words, doing it the right way.
One more question about the Haiku input_server: will it be binary companitible with R5? In other words, will the input methods designed for R5 work with the haiku input_server?
Lastly, if you need people to test the input_server, let me know. I am sure we have a few very eager to test .
I guess what the guys at JPBE.net were hoping was a couple of new functions in the input_server so that they do not have to rely on hacks.In other words, doing it the right way.
These guys can always propose an API, then we can discuss on this base.
koki wrote:
One more question about the Haiku input_server: will it be binary companitible with R5? In other words, will the input methods designed for R5 work with the haiku input_server?
I’m not sure about this, it should be binary compatible as devices and filters already are.
koki wrote:
Lastly, if you need people to test the input_server, let me know. I am sure we have a few very eager to test .
I guess what the guys at JPBE.net were hoping was a couple of new functions in the input_server so that they do not have to rely on hacks.In other words, doing it the right way.
These guys can always propose an API, then we can discuss on this base.
I will discuss with them later this week, and post here what their thoughts are.
Just a quick follow up to tell you that there has been quite a lot of discussion on JPBE.net about this (for those interested, it is at http://www.jpbe.net/forum/viewtopic.php?t=622&start=0, in Japanese, of course), and that at some point in time there may be some specific proposals on what would be needed to improve input methods in general.
Switcher is pretty good, but it’s just a keymap switcher, not a full blown IME (which to my understanding is more complex). Is there any suggested design on what the final solution should be like? How do other OSes handle this?
Switcher is pretty good, but it's just a keymap switcher, not a full blown IME (which to my understanding is more complex). Is there any suggested design on what the final solution should be like? How do other OSes handle this?
Prog.
Typically, you can load additional input methods (such as Japanese, Chinese, etc.), and then you can switch between them with a specific (or programable) key combination.
The main difference that I see between Windows and BeOS, is that in the former input methods are selected on a window basis (that is you can be using English in Word, and Japanese in IE, for ex.), while in the latter any given input method is enabled OS-wide, that is, regardless of the app you are using. I am not sure which method is better.