How does a skin's layout file cater for non-US keyboards?

181 views
Skip to first unread message

MickM

unread,
Sep 29, 2023, 9:21:07 AM9/29/23
to Free42 & Plus42
On the US keyboard shift-3 is # but on the UK keyboard it's £ (and # is actually on it's own key). Presumably there are similar differences in other region's keyboards. I'm getting a desktop version of my Plus42 skin ready and it occurs to me that the keyboard bindings for 3 and ⇧3 and actually coded as 3 and # i.e. that would break the corresponding UK keyboard binding for ⇧3 (I think). On the Mac anyway, if I try to fix that by taking the binding for # and making a duplicate key binding for £ then I undermine the US key binding for ⌥3 which just happens to also be £. Ignoring for the moment that # has other constraints (given that it's a comment character in the layout file), how do the British or other similarly affected countries use the PC version of Free42/Plus42 without issue? I've certainly seen other keyboards where ⇧2 is " etc. 

Thomas Okken

unread,
Sep 29, 2023, 10:08:44 AM9/29/23
to Free42 & Plus42
If a user has a keyboard where the standard keymap doesn't work, they'll have to customize the keymap... that's the reason why Free42 and Plus42 create an external keymap.txt file, to allow this kind of customization. I don't have any non-U.S. keyboards to play with, but if users create keymap versions adapted for such keyboards, I wouldn't mind publishing them on my web site. (Nobody has ever asked about this before, I'm actually surprised that it took 19 years!)

Regarding the # sign specifically, in Mac keymaps, you can use 0x23 instead. In Windows and Linux keymaps, # is specified as Shift 51 and numbersign, respectively.

(It would be better if you could specify # if you specifically want to map that character, and specify Shift 3 if you specifically want the shifted 3 key, regardless of which character is there. But generally speaking, I think keyboard mapping in Free42 and Plus42 is impossible to do "right," and the way it works now is just something that at least works for U.S. keyboards, and is not too hard to modify.)

Paal Rasmussen

unread,
Jan 20, 2024, 7:14:42 AM1/20/24
to Free42 & Plus42
Why it has taken 19 years? Interesting!
1) I tend to use the phone version for most trivial tasks. There I use the standard skin, AND use the mouse as I believe that my motor neurons retain much of their training by using the "push key" paradigm rather than "use keyboard". To me those two are different skill sets.
2) I think only a few users change the layout, perhaps because changing things around breaks the recourse of online/printed manuals and tutorials.
3) I believe I'm not the only one.

PS. I'm so happy to have found the Plus42 - it is a great everyday tool in my field (electronics/acoustics) AND it's a help in understanding and experimenting with mathematics. But my greatest joy is in the aesthetics department. The 42 is aesthetically pleasing, it avoids clutter and stays true to the HP calculator ethos that might best be summed up with the words from Dr. Dobbs Journal: "Travel light without overbyte!"

What other technologies do I admire? The 6809 microprocessor with its OS9 operating system, now seeing a new lease of life in the Turbo9 project.
In many ways this defined the epitome of computing. Development since has been "more, faster, bigger" and mainly focused on "user experience" - 80% of CPU power used to drive a ridiculously large screen with 10 bit colour. #end_of_rant

Thomas Okken

unread,
Jan 20, 2024, 7:16:42 PM1/20/24
to Free42 & Plus42
Speaking as a software developer — Free42 and Plus42 are really a hobby that got out of hand, but programming is also my actual job — I have to disagree with the "more, faster, bigger" take on software development. There is a seeming infinity of things people could use computers for, and as hardware companies deliver ever faster CPUs and larger RAMs and disks, more and more of those things become practical. That seems to me to be a good thing. It's not developers coming up with more and more ways to waste CPU cycles, it's actual users with actual wishes and needs.

Having said that, I do have moments of nostalgia for the days when computers were simpler. I got started with the Commodore PET and the Commodore 64, and it was a lot of fun to make those machines perform clever and useful tricks, while one or two books provided exhaustive documentation of their hardware and ROM software.

But I wouldn't actually want to go back to that. Programming with the primitive IDEs we had back then, if we had IDEs at all? No thanks, that would be painful. Same for those ancient word processors. Or web browsers before CSS. No Internet. No streaming video. No relational databases. No C++ or Java or Python. No 24-bit color. Even vim would be too much for early computers to handle. I could go on.

Several years ago, a colleague threw out his old Macintosh LC. As an early Mac adopter myself — my first more-than-8-bit computer was the original Mac, followed by a Mac II a few years later — I took the machine to my office, hooked everything up, and turned it on. It was in excellent shape and it worked perfectly, but after 15 minutes, I put it back out in the hallway. My colleague was right, that thing was just not usable any more. Put it in a display case, sure, but not on the desk of someone who likes to get things done. :-D

6502 assembly language programming was fun though. I'll never deny that. 😇

Regarding custom keyboard maps: it is a mystery. Free42 has tens of thousands of users, and there must be at least a few hundred in places like Russia and Japan where they don't use QWERTY keyboards. I have gotten emails from some of them, but never about keyboard mapping problems. I find this surprising, but I'm not complaining, because, as I mentioned earlier, doing keyboard mapping in a way that works well for everyone out of the box is hard bordering on impossible. If people find the app good enough with its primitive keyboard maps, I'll count my blessings and let sleeping dogs lie.
Message has been deleted

Chris Roper

unread,
Mar 6, 2025, 8:30:36 AMMar 6
to Ion Marqvardsen, Free42 & Plus42
@ Paal,

I loved the 6809 too.

I started my career  with the 6800 on Motorolor development boards whilst studying and working in Process control and Instrumentation.

My first PC was a Sinclair ZX80 but I really got into the PC side of things when I bought a Dragon64 with a 6809 processor.
It had Interprative Basic but I had far more fun programming in 6809 Assembler.

Too this day I think I could still read 6809 Hex Code, and in some cases debug it, without referring to source ;>)

cheers
Chris

p.s. Agreed on the calculators, I have only ever had HP models as they are by far the best architecture.
Free42 Included.

On Thu, Mar 6, 2025 at 3:04 PM Ion Marqvardsen <i...@alea-quantum.com> wrote:
I'm using a Danish keyboard and it works, except for some keys. I can't do addition and multiplication from the keyboard. 

What is the format of keymap.txt and how do you make free42 read the file?
--
You received this message because you are subscribed to the Google Groups "Free42 & Plus42" group.
To unsubscribe from this group and stop receiving emails from it, send an email to free42discus...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/free42discuss/375e0bf6-706b-4783-80d3-6a90fbd4e1fbn%40googlegroups.com.

Ion Marqvardsen

unread,
Mar 6, 2025, 8:35:32 AMMar 6
to Free42 & Plus42
I am one of the users that enjoy free42 from a non US keyboard. I use a Danish keyboard. Free42 worked out of the box for most keys except for the following: Adding, multiplying and division.  Here the keyboard would default to the shifted keys: Pressing '+' on the keyboard would open CATALOG. Pressing '/' on the keyboard would open STAT. Pressing '*' would open PROB.



On Sunday, January 21, 2024 at 1:16:42 AM UTC+1 Thomas Okken wrote:

Thomas Okken

unread,
Mar 6, 2025, 9:59:11 AMMar 6
to Free42 & Plus42
Were you able to modify keymap.txt to your satisfaction?

Ion Marqvardsen

unread,
Mar 10, 2025, 5:08:14 AMMar 10
to Free42 & Plus42
Yes, I was able to change it the way I wanted it.

The process of changing the keymap.txt was fairly easy. The hard part was to find it in AppData/Roaming. This is just me, because I am not a programmer. 

Thomas Okken

unread,
Mar 10, 2025, 10:47:49 AMMar 10
to Free42 & Plus42
The location of the keymap.txt file is mentioned in the README.txt that is included in the zip file. That is easy to overlook, though, and it isn't mentioned anywhere else. Maybe it would help if I added a link to README.txt in the Help menu? I am open to suggestions...

Ion Marqvardsen

unread,
Mar 12, 2025, 11:01:01 AMMar 12
to Thomas Okken, Free42 & Plus42
Hi Thomas,

Yes, you are right it is easy to overlook that the README.txt does mention the keymap.txt, because it does it under the installation section. Most users will probably -like me- skip that section because the installation is easy.

One easy fix would be to change the heading of "Installing Free42" to "Installation and customize keymap of Free42"

Alternatively have a link to keymap.txt from within Free42.


On Mon, Mar 10, 2025 at 3:47 PM Thomas Okken <thoma...@gmail.com> wrote:
The location of the keymap.txt file is mentioned in the README.txt that is included in the zip file. That is easy to overlook, though, and it isn't mentioned anywhere else. Maybe it would help if I added a link to README.txt in the Help menu? I am open to suggestions...

--
You received this message because you are subscribed to a topic in the Google Groups "Free42 & Plus42" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/free42discuss/nOvATRsQu3g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to free42discus...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/free42discuss/e42dc77d-0960-44e9-8bc2-8edf9f103129n%40googlegroups.com.

Thomas Okken

unread,
Mar 12, 2025, 2:21:37 PMMar 12
to Free42 & Plus42
One easy fix would be to change the heading of "Installing Free42" to "Installation and customize keymap of Free42"

Alternatively have a link to keymap.txt from within Free42.

Sounds good! I think I'll do both.

Thomas Okken

unread,
Mar 13, 2025, 8:23:05 AMMar 13
to Free42 & Plus42
I'm adding this section after the "Keyboard Mapping" section:

Customizing the Keyboard Map

The standard keyboard map is designed to work well with U.S. English keyboards.
If you use a different keyboard layout, or if you have specific preferences for
how the keys should be mapped, you can customize the keyboard map to better fit
your needs.

The keyboard map is %APPDATA%\Free42\keymap.txt, which is usually
C:\Users\<YourUserName>\AppData\Roaming\Free42\keymap.txt. You can edit this
file using any text editor. For convenience, you can use the "Edit Keyboard
Map" command in the Help menu to open the keyboard map in the default text
editor. Note that after making changes to the keyboard map, you have to exit
and restart Free42 for the changes to take effect.


That's the README.txt for Free42 for Windows; the README.txt files for the MacOS and Linux versions, and for Plus42, mention the location of keymap.txt for those platforms, of course.

In the Help menu, I'm adding an option "Edit Keyboard Map," which opens keymap.txt in whatever the default text editor is.

Ion Marqvardsen

unread,
Mar 18, 2025, 5:56:41 AMMar 18
to Thomas Okken, Free42 & Plus42
The Free42 program is already really great. The keyboard customization makes a huge difference, because for me (with a Danish keyboard) the functions for plus, divide and multiply need to be remapped. All other keys work perfectly. For example, the divide '/' is shift-7 on my keyboard. When I press and hold shift and press '7' then Free42 divides y with x. When I press and release shift and then press '7', then I get to the 'solver' menu. That is very intuitive. 

In the attachment is the DK keymap.txt.








--
You received this message because you are subscribed to a topic in the Google Groups "Free42 & Plus42" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/free42discuss/nOvATRsQu3g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to free42discus...@googlegroups.com.
keymap.txt
Reply all
Reply to author
Forward
0 new messages