Post Reply 
Open problem: optimal calculator keyboard layout based on key usage statistics
05-28-2018, 01:27 PM (This post was last modified: 05-28-2018 10:29 PM by emece67.)
Post: #1
Open problem: optimal calculator keyboard layout based on key usage statistics
Hi all,

Motivated by some discussions about the key layout of the, maybe, future wp43s, I decided to measure the relative usage frequencies of the keys in a calculator.

For that purpose, I modified the source code of the wp34s Qt emulator for it to keep a record, on disk, of the key usage. After a few days of not using any "real" machine, but only the emulator, I do have now some preliminary numbers. As I'm only interested in the basic layout of the machine (that is: number input plus basic ops, this translates to digits, decimal point, CHS, ENTER, EEX, 4 basic ops, backspace, SWAP, down stack & EXIT), I'll only show the numbers for such keys. They are (key: % usage)
  • 0: 9.77
  • 2: 8.35
  • 1: 8.24
  • ENTER: 6.97
  • .: 5.82
  • 5: 5.74
  • 3: 5.05
  • /: 4.26
  • 6: 4.23
  • 7: 3.73
  • 4: 3.71
  • 8: 3.04
  • Backspace/CLx: 2.89
  • *: 2.58
  • -: 2.09
  • +: 1.93
  • 9: 1.34
  • EXX: 0.97
  • CHS: 0.93
  • X<>Y: 0.91
  • EXIT: 0.86
  • Stack down: 0.16

Based upon this frequencies, what do you think will be an "optimal" keyboard layout, minimizing the finger flight time. Some rules to be obeyed:
  • The keys will be placed in a rectangular array
  • ENTER will occupy a double sized site
  • 1-9 will be placed in the usual way 1-2-3 below 4-5-6 below 7-8-9
  • +-*/ (in the order you decide) will be placed contiguous in a single column or row

Some other interesting data and open questions:
  • The % usage of the combined 3 shifts in the wp34s was 6.16%
  • There were aprox. 5 RCL for each STO
  • Do the digit key frequencies follow the Benford's law?
  • Do you think that, after all, there may be a reason after early hp machines having the ENTER and the basic operations at the left, with / at the bottom?

Thoughts and layout proposals?
Find all posts by this user
Quote this message in a reply
05-28-2018, 01:40 PM
Post: #2
RE: Open problem: optimal calculator keyboard layout based on key usage statistics
I don't know about calculators, but in typing, the backspace seems to be the most common key (not counting the alphabet and spacebar.)

Digit key frequencies do not follow Benford's Law as that only applies to the first digit. This doesn't matter too much as either calculator order (as you suggest) or the phone order are about the only two that need no thought from the user.

Making "Enter" double sized is good. Another thing I would like is to have separate "Backspace" and "Delete" keys. I find that during editing (words or numbers or codes) I often end up wanting to delete the character under the cursor about as often as that preceding the cursor. If wrong, most calculators take two keystrokes, either a shift key and the Delete (or Backspace) or an arrow key to move to the position that needs no shift.

The HP 48, 49, 50 series seems to get some advantage by having the function keys operate from a menu that one can program. I use this often to assign either programs or things that take lots of keystrokes to find to my custom menus. Working with big integers uses things like Mod and Divide with Remainder but working with reals uses other things like Round or Truncate, etc., for example.
Find all posts by this user
Quote this message in a reply
05-28-2018, 02:08 PM
Post: #3
RE: Open problem: optimal calculator keyboard layout based on key usage statistics
(05-28-2018 01:27 PM)emece67 Wrote:  Motivated by some discussions about the key layout of the, maybe, future wp43s, I decided to measure the relative usage frequencies of the keys in a calculator...

To understand the meaning and applicability of this data, can you explain how you "used" the emulator once you had it instrumented to log key use, e.g. for what applications? For example, both EEX and CHS were used very little, so it seems there were primarily positive, relatively small numbers; different applications would likely change these numbers significantly.

Thanks for the effort to make the mods, then collect and share the results. Interesting stuff.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
05-28-2018, 10:28 PM (This post was last modified: 05-28-2018 10:41 PM by emece67.)
Post: #4
RE: Open problem: optimal calculator keyboard layout based on key usage statistics
(05-28-2018 02:08 PM)rprosperi Wrote:  To understand the meaning and applicability of this data, can you explain how you "used" the emulator once you had it instrumented to log key use, e.g. for what applications?

Everyday use at home and at work (EE). I suppose it means not much very high/low numbers (specially at home), so light usage of EEX and, also, not much negative numbers. The big total of keystrokes was around 7000.

What surprised me was the high number of / against *, - and +. I also didn't expect at all + being the less used basic operation. Another unexpected (to me) result was the very low use of the stack down key.

Concerning the Benford's law, I still think that the measured digit frequencies are related to it. At least, it is likely that the first digit of each entered number distributes according to it, so the final measured frequencies must have some resemblance to this distribution. Even more when, as it is my case, I do not use to enter numbers with much digits, but as much as 4 to 6 digits.

Does anybody have a clue about how to locate an "optimal" key layout from frequencies. My first approach was to compute the centroid of the 1-9 digits (from the "standard" layout and taking into account the frequencies of each digit), and then add the next most-frequent key as near as possible to that centroid. Compute the new centroid and iterate until key exhaustion. But I'm not sure at all that such naïve approach ensures minimal finger flight time.

Regards.

Edit: well, the ratio between EEX and ENTER keystrokes was about 1:7, so I think that approximately one of each seven entered numbers needed and exponent. Not sure is such is exactly a lower than expected ratio.

EDIT 2: There were other keys with high keystroke counts that I have not included in the listing as I do not think about them as "basic" keys. They were: OFF (2.04 %), Sigma+ (1.02 %. Yes, I was doing some regression analysis) and 1/x (0.91 %).
Find all posts by this user
Quote this message in a reply
05-28-2018, 11:17 PM
Post: #5
RE: Open problem: optimal calculator keyboard layout based on key usage statistics
Things I've found somewhat true after playing for a while with calculators:
  • The keys (if they're not on the fascia or keys) you need the most are often the ones buried the deepest in menus, or indeed the CATALOG (not looking at you, FACT.)
  • The function you've been trying to find for the past five minutes is the primary function on the second key over on the second row down, i.e. the key your eyes keep skipping over. (This one has personally bitten me more than once, on both the 50G and 9750gII)
  • Each person (presumably) may well use the calculator differently from anyone else, though you can at least model commonalities. This point is less likely for school children (all students solve the same problems using (roughly) the same keys) and more true for professionals.

(Post 234)

Regards, BrickViking
HP-50g |Casio fx-9750G+ |Casio fx-9750GII (SH4a)
Visit this user's website Find all posts by this user
Quote this message in a reply
05-28-2018, 11:45 PM
Post: #6
RE: Open problem: optimal calculator keyboard layout based on key usage statistics
Funny to me that you used / more than 4 6 7 or 8. :-)

Gene
Find all posts by this user
Quote this message in a reply
05-29-2018, 05:53 PM (This post was last modified: 05-29-2018 05:57 PM by ijabbott.)
Post: #7
RE: Open problem: optimal calculator keyboard layout based on key usage statistics
Personally, I tend to use the EXIT key to enter numbers on RPN calculators (on those that have an EXIT key, such as HP-42S) rather than the ENTER key. Does that make me weird?
Find all posts by this user
Quote this message in a reply
05-29-2018, 06:04 PM
Post: #8
RE: Open problem: optimal calculator keyboard layout based on key usage statistics
(05-29-2018 05:53 PM)ijabbott Wrote:  Personally, I tend to use the EXIT key to enter numbers on RPN calculators (on those that have an EXIT key, such as HP-42S) rather than the ENTER key. Does that make me weird?

No, but asking this does make you funny. Thanks for the laugh... Smile

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
05-29-2018, 08:45 PM
Post: #9
RE: Open problem: optimal calculator keyboard layout based on key usage statistics
I suppose that using "EXIT" to remove one number calls for using "EXEUNT" to remove a set of numbers.
Find all posts by this user
Quote this message in a reply
01-26-2019, 08:25 AM
Post: #10
RE: Open problem: optimal calculator keyboard layout based on key usage statistics
(05-29-2018 05:53 PM)ijabbott Wrote:  Personally, I tend to use the EXIT key to enter numbers on RPN calculators (on those that have an EXIT key, such as HP-42S) rather than the ENTER key. Does that make me weird?

I never knew. This is handy! Definitely not weird.
J

Jaco Mostert, Elec Eng
C47 on DM42, 42S, WP34C&S, 28C, 35S, 32Sii, had 11C; used 67, 85; iOS:42s, Free42, WP31S&34S, HCalc; OSX:WP34C.
Find all posts by this user
Quote this message in a reply
01-27-2019, 04:42 AM
Post: #11
RE: Open problem: optimal calculator keyboard layout based on key usage statistics
(05-29-2018 05:53 PM)ijabbott Wrote:  Personally, I tend to use the EXIT key to enter numbers on RPN calculators (on those that have an EXIT key, such as HP-42S) rather than the ENTER key. Does that make me weird?
I only recently found about that and I love / use it massively now on the DM42.
Find all posts by this user
Quote this message in a reply
01-27-2019, 03:44 PM
Post: #12
RE: Open problem: optimal calculator keyboard layout based on key usage statistics
(05-28-2018 11:17 PM)brickviking Wrote:  
    ...
  • The function you've been trying to find for the past five minutes is the primary function on the second key over on the second row down, i.e. the key your eyes keep skipping over...

You know, I spent an embarrassing amount of time looking for the pi key on my WP-31 shortly after I assembled it...

The results were interesting. It would tend to explain the number of vintage Voyagers I've seen with worn "0" keys. And not just the 12c's, where it could be argued that financial types (real estate agents, loan officers) use a lot of zeros when making rough calculations about loan payments, etc.
Find all posts by this user
Quote this message in a reply
01-28-2019, 01:48 AM
Post: #13
RE: Open problem: optimal calculator keyboard layout based on key usage statistics
Possibly useless idea:
Surely with all the ROM Byte code we have in such masterpieces as the PPC rom, we could disassemble the ROMS in the library and run statistics on what keys would have to be pressed to re-type all the useful programs?

I realize that might result in some unnecessary entries like END,GTO, and LBLs (or some of the ALPHA strings related to program flow/execution) that might not actually be a part of every day use, but surely a good percentage of each ROM would actually represent the kind of calculations people do manually and would want direct keys for?

17bii | 32s | 32sii | 41c | 41cv | 41cx | 42s | 48g | 48g+ | 48gx | 50g | 30b

Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 5 Guest(s)