Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kbdru.dll #15

Open
stsp opened this issue Mar 7, 2025 · 22 comments
Open

kbdru.dll #15

stsp opened this issue Mar 7, 2025 · 22 comments

Comments

@stsp
Copy link
Member

stsp commented Mar 7, 2025

Discussed in #14

Originally posted by j2969719 March 6, 2025
after a fresh installation both keyboard.dll and secondkeyb.dll in the keyboard section of the system.ini file have the value kbdru.dll, which makes it impossible? to enter latin chars. it would be nice if the keyboard.dll value was empty right away

@stsp
Copy link
Member Author

stsp commented Mar 7, 2025

I think there was no entry
for that in an .shh file. But
of course there is always a
possibility to just fix that up
directly from the script?

@jschwartzenberg
Copy link
Member

There seems to be an entry for the primary DLL only. I removed it when introducing multi-language support.

I think indeed post-installation editing of the ini files is the way to go here. I also found that the Dutch version of Windows 3.1 is configured with the Dutch layout which is actually rarely found also in the Netherlands. (The US layout is common here.)

Do you think it would be possible to derive the correct layout from the layout of the host OS?

@stsp
Copy link
Member Author

stsp commented Mar 8, 2025 via email

@jschwartzenberg
Copy link
Member

No that won't work out for German and French for example. They use qwertz and azerty layouts only.

@stsp
Copy link
Member Author

stsp commented Mar 8, 2025 via email

@jschwartzenberg
Copy link
Member

Yes, but it also means you'd likely have set both the US and RU layouts on the host system. If we could derive the layout from that, it would suit any variant.

@j2969719
Copy link

j2969719 commented Mar 8, 2025

maybe let the script also extract all kbd*.dll and additionally supply some simple gui tweaker to change the switch/layout settings?

helloworld.tar.gz

@stsp
Copy link
Member Author

stsp commented Mar 8, 2025

Yes, but it also means you'd likely have set both the US and RU layouts on the host system

Maybe we could, but that likely
is going to be gnome- or X-specific.
I don't know any portable way of
doing that. If you know one - fine,
but otherwise I suppose we need
to do the "best guess".

maybe let the script also extract all kbd*.dll and additionally supply some simple
gui tweaker to change the switch/layout settings?

There is likely no way to extract
more than 2 layouts. setup.exe
is not prepared for that. Its not
like we use our own setup.exe,
its the one from windows, so not
too much we can extend it.

@jschwartzenberg
Copy link
Member

The files are probably compressed with an msexpand variant. Typically a decompressing command-line tool is provided too. I think that variant is doable actually.

@stsp
Copy link
Member Author

stsp commented Mar 9, 2025 via email

@j2969719
Copy link

j2969719 commented Mar 9, 2025

I meant to leave the installation non-interactive and set the appropriate values ​​depending on the host locale, but also provide the ability (gui or dos) to change these settings later if necessary. I don't know about other languages, but as far as I remember, with the ru installer, if you forget to change the key combination or the primary layout on the first screen, you have to reinstall the whole thing again, because even running setup.exe in the windows folder from dos will not allow you to change these settings.

@stsp
Copy link
Member Author

stsp commented Mar 9, 2025

Image
From this screen-shot you can
see that there already is such a
GUI.

@j2969719
Copy link

j2969719 commented Mar 9, 2025

My bad, I knew I was stupid, but I didn't think I was THAT stupid.

@stsp
Copy link
Member Author

stsp commented Mar 9, 2025

But the problem still exist.
It just means that the GUI
part is already there, but I
still think we should not
create ru/ru to start with.

@jschwartzenberg
Copy link
Member

Yes, the defaults from Windows 3.1 just appear to be quite bad for some situations. I think we can probably get away with doing something like:

  1. attempt to query the layouts and use them when something is found
  2. have a sane fallback when that doesn't work out

Implementing step 2 first would seem good to start with to make sure the fallback at least gets tested. At least these we know now:
Russian, keyboard should be US + RU (default RU + RU)
Dutch, keyboard should be US (default is NL)
Languages that fallback to the CEE version, keyboard should match the language (default is probably US).

It would seem practical to have a script that can be ran at any time post-installation which resets the keyboard layout. The installation script would just trigger it at the end, but the user may also run it themselves. It would be a setw31kl.bat (set Windows 3.1 keyboard layout) that:

  1. Is aware of the locale, correlates it to a language
  2. Tests the corresponding keyboard layout(s) is/are available
  3. Updates the ini file

If a layout DLL is not available there would be a fallback. I think the US layout is implemented as "no DLL", so likely it would be the fallback.

Technically that script could even run at boot-up so that one could change the locale and have the keyboard layout match accordingly.

@stsp
Copy link
Member Author

stsp commented Mar 9, 2025

No, we shouldn't do random
changes to the user configs if
just something on host have
changed. Also given the GUI
shown above already exist, I
don't see any need in an
out-of-install approach. IMO
we just need to amend the
installation and leave everything
else up to the user who can
just run that GUI himself.

Also I am really skeptical
you can come up with the
portable layout detection
tricks. So unless you know
how to do that, why to even
bother.

@jschwartzenberg
Copy link
Member

But either way the locale (if not the actual layout) needs to be used as for some cases the best layout cannot be derived from the version of Windows that gets installed.

@stsp
Copy link
Member Author

stsp commented Mar 9, 2025

Could you please give the
examples for better understanding?
For example you installed Dutch
version. Now can you have US
as a primary layout there?

@jschwartzenberg
Copy link
Member

Yes, Dutch is relatively straight-forward.

The situation is more complex for languages like Romanian, Croatian, etc. Those languages are supported through Windows 3.1 for Central and Eastern Europe (CEE). The UI is always English, but it uses codepage 852 which supports these languages. As these languages use different accented letters, they have their own keyboard layouts. See for instance the Romanian layout: https://en.wikipedia.org/wiki/Romanian_keyboard_layout

@stsp
Copy link
Member Author

stsp commented Mar 10, 2025 via email

@jschwartzenberg
Copy link
Member

Yeah, that's probably the worst case indeed.

@stsp
Copy link
Member Author

stsp commented Mar 10, 2025

Exactly!
If its just the single case,
lets fix it and forget.
Simplicity is the key, or we
end up writing nothing at all. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants