> Besides this question came about because precisely the same software
> running on different machines gives different results for
> CTRL+LEFT/RIGHT.
Gary is right - keypresses are sent as Windows messages to the application
which currently has the focus. What the application does with it is up to
the application writer.
> The application wouldn''t directly handle stuff like that. A
> file search program's developer hasn't had to work out algorithms for
> handling editing keys and cursor move keys.
Yes, but that is because modern software is written using "components",
which are usually implemented as DLLs. For instance, lots of applications
that offer text editing use a standard RichEdit component, which is
implemented by the Windows API. Likewise there are standard Open and Save
dialogues, colour pickers, and so on.
RichEdit has handlers for a great range of key presses (as do most of the
other components), and this default behaviour is "programmed in" to RichEdit
by Microsoft. However, the application programmer who uses a RichEdit can
override the default behaviour by capturing key strokes and processing them
within the application.
In summary then, a component such as a text edit box, a File Open dialogue,
or any of the other standard bits and pieces that make up a Windows
application, has a default behaviour for each key press, programmed in my
Microsoft. The application programmer can override them.
The components are, in effect, built in to Windows and largely implemented
as DLLs, I believe. The only explanation for the behaviour you are seeing
is that the application must be running on two different operating systems
(or different updates of the same OS). It is feasible that older versions
of Windows implement some of the component behaviours differently.
In any case, I don't think there is anything you can do about it directly.
Mixing and matching system DLLs would be a recipe for disaster. You would
have to do a proper OS upgrade.
I can't think of any other explanation for the strange effect you are
seeing.
SteveT
|