151. A button map belongs to a device, and an activity's map is that plus its overrides¶
This section exists because a design was got wrong, and the wrong design passed every check. On 22 August 2026 FreeHarmony grew a page for one device on one remote, with the remote drawn and its keys clickable, and it showed the keypad per activity. The reasoning was a measurement: every keypad binding in the corpus sits in a map that an activity installs, with no counterexample across three architectures. Danny's objection was one sentence, and it is not about the bytes at all: a Harmony has device mode, reached by the Devices key, where the whole keypad drives one chosen device with no activity running. So the page being built was the device mode editor, and the measurement had been used to answer a question it cannot answer.
docs/how-a-harmony-works.md is the missing context, written the same day, and
.claude/skills/how-a-harmony-works/SKILL.md is the ritual that makes it get read. The finding below is
what the corpus does say once the right question is asked of it.
Logitech's own manuals corroborate it, and they were in the lab the whole time. Four of them, for the Harmony 525, 600, One and 885. The One's is the plainest statement of the mechanism: "After you select a device, the Harmony One controls only that device. You have access to all the commands for the device system." The 885's gives the example, "If you choose Television as the device, the number, volume and channel buttons will all control your television", and names the mode: "Press Devices to enter device mode... To access device mode you do not need to be in an Activity." So the keypad remap is the vendor's statement rather than an inference, and what is open below is only where the map lives in the file.
They also corrected three things this project had just written down.
The Harmony 600 has no Devices key. Its button table lists every key on the remote and there is none;
the screen writes "Devices" above the centre key of the three below the display, and "Activity" to come
back. docs/how-a-harmony-works.md and both CLAUDE.md files had said it has a physical one.
"Current Activity" is the Harmony One's wording, not the product's. The 600 says "Activity", the 525 uses its Activities key, and an 885 leaves device mode by pressing DEVICE again.
And Logitech's advice runs against the way the feature is actually used. The 885 manual: "you should never need to use Device mode during normal use of your Harmony remote", and "you can eliminate the use of device mode by customizing your Activities", by putting the command on the display or on a button. Danny uses device mode routinely for exactly those commands. Both are true, and the second is an argument for an activity screen editor rather than against a device page.
A device's own map is what the activity maps agree on¶
For every pair of a device and a scan code, collect the command that pair sends in each activity map that binds it. Over all fifteen user configurations:
| count | |
|---|---|
| pairs of a device and a button | 1105 |
| the same command in every activity that binds them | 1096 |
| disagreeing across activities | 9 |
| devices with bound buttons | 50 |
| devices whose every button agrees | 47 |
The nine are not noise and they are what an override looks like: an amplifier whose input selection differs per activity, and a handful of keys customised inside one. That is what Logitech's own software offers, and it is the reason a device's map is the agreement rather than the union.
Split the 1096 a second way, by whether every activity that drives the device binds the button at all:
| count | |
|---|---|
| bound in every activity that drives that device | 970 |
| bound in only some of them | 126 |
So the 126 are a device's button that some activities carry and others do not, which is again authoring rather than structure: an activity's map holds the buttons that make sense in it. The two ends of that comparison come from different places, since which activities drive a device is read off the bindings and which activity a map belongs to is read off the activity's own record.
What this is a measurement of, which is the activity maps¶
It is not a statement about what a device page shows, and reading it as one is the mistake this section records rather than a rail it establishes. FreeHarmony got it wrong three times running on the strength of these numbers: a keypad shown per activity, then a device map annotated with which activities carried each key, then a save that reported per activity what it had reached. Each was a fact about the activity map put on a page about a device.
A device's map and an activity's map are two maps of the same keypad, authored separately, and Danny's picture of the first is the one to hold: switching to a device is like reaching for the old remote that came in the box with that appliance. There is nothing but that appliance on it. Logitech's own software has a page for each, "Changing how buttons work for a device" and "Changing how buttons work in an Activity". So in an activity any key may carry any appliance's command, and in a device's map two appliances holding the same key is not a conflict at all.
What the numbers above do establish is that an activity's map reads as the device's map plus that activity's own overrides.
They do not make a device map reconstructable, and this paragraph said they did. It read that where every activity that binds a key agrees, that agreement is the device's answer. The file states a device's map, section 271, so that rule can be scored against it, and it is wrong on 136 of the 1032 pairs where every activity agrees and blind to a further 568 keys no activity binds. It also follows that the nine disagreements here are not the whole of the overriding: they are the overrides that two activities happened to disagree with each other about.
The consequence, which is a rail for an activity editor¶
A change to an activity's map has to be written into the whole activity, and there the buttons other appliances hold are the constraint. Writing one activity of several leaves the remote behaving exactly as before in the activity somebody is sitting in, which is the worst failure available: the file changed, the checksum still passes, and nothing happened.
And not into the activities where another device holds that button, which is the correction the rail needed and which the table above hides by being a count of pairs. Ask it the other way round: across the activities that drive the device, is that button available at all? Same 1105 pairs, and which activities drive a device now comes from the activity's own record while who holds a scan code comes from the keypad maps.
| count | |
|---|---|
| this device's button in every activity that drives it | 938 |
| another device holds it in at least one of them | 131 |
| nothing holds it in at least one of them | 117 |
| both of those | 81 |
So a button that works the television while you are watching television and the amplifier while you are listening to music is ordinary rather than exceptional. And a corpus total understates how concentrated it is, which is why the test asserts one device as well: the Harmony One's receiver has 35 buttons, eight activities drive it, and 3 of the 35 are its own in all eight. Writing every driving activity would take the other 32 off another device. Refusing when one activity is in the way, which FreeHarmony's writer did for a day, blocks those same 32.
So an activity editor writes where there is room, leaves the rest exactly as they are, and names them before the change is made. A device editor has none of this to worry about, since its map holds one appliance and nothing can be in the way.
Two things the earlier phrasing hid. The pair count above answers "do the activities that bind this button agree", which is a different question from "can a change to an activity reach every activity that uses this appliance"; the first is 1096 of 1105 and the second is 3 of 35 on one real remote. And neither question is the one a device page asks. FreeHarmony's own figures for that receiver are 30 rather than 35, because it counts only buttons whose scan code has been measured on the drawn model, 34 of a Harmony One's 44.
The screen is the bigger half of device mode¶
Recorded here because it explains both the vendor's advice and why the feature exists. An old remote has far more buttons than a Harmony, so what people build in device mode is pages on the screen: a screenful of commands at a time, for the functions the keypad has no room for. Those never belonged on an activity's keypad map, which carries what somebody uses often.
That makes the keypad the smaller half of a device's map, and it means the screen keys, section 128's second population, are where the interesting part of device mode lives. Nothing here reads which appliance a screen page belongs to, section 52, so that is the reading a device page eventually needs.
Where device mode's own keypad map lives, closed by section 271¶
This heading read "is open" and the answer below it was wrong, until 6 September 2026. The measurement stands and the conclusion drawn from it does not, so both are kept here.
The measurement, over base slot 9 and over the fifteen user configs: 158 keypad maps, of which 65 are
installed by something in the configuration itself, 0x1F with a high byte of 0xFF selecting one per
section 120, and 50 of those by an activity. Exactly those 50 send a code, and no map an activity
does not install sends one. The other 108 send nothing, and 38 of them bind fifty or more keys to lists
made of comparisons, register work and mode entries, which is a menu rather than a device.
The conclusion drawn from it was that no keypad map in any configuration here sends an infrared code outside an activity, and therefore that no configuration here holds a keypad map for device mode. Both are false. What is true is the narrower statement that base slot 9 belongs to the activities. A device's own map is a base slot 6 mode record's own tagged list, it is in every configuration here, and the firmware resolves a key press against the current page, then that list, then the base slot 9 stack. Section 271.
So of the three readings this section offered, the third was right: "there is a map in the container nothing here recognises". The uncomfortable part is that the reader for it had existed since section 52 and nobody had asked those lists what they send. The instruction the section gave, that what settles it is the firmware routine behind the Devices item, was also right, and section 69 had already read the routine a month earlier without either section noticing the other.
The screen side of the argument was sound and survives, restated by section 271 from a third side: mode
page bindings use four distinct scan codes on the Harmony 600, seven on the Harmony One and four on the
Harmony 525, and none of them is a physical key according to the measured geometry in
packages/silhouettes. What that shows is that a page is not a keypad map, and the mistake was
reading it as showing that base slot 6 holds none.
The methodological lesson is one this section already states about itself and then repeated. It records that a corpus measurement was used to answer a question about the product. The second failure is different and worse: a corpus measurement over one structure was used to answer a question about the container, and the section's own three readings named the right answer without anything going to look.
The methodological failure, recorded because it will recur¶
Two things went wrong and only one of them was the conclusion.
A measurement over the corpus was used to answer a question about the product. The corpus agreed with itself, on three architectures, with no counterexample, about a feature it holds no bytes for. That is not a weak corpus, it is the wrong instrument, and no amount of samples would have helped.
And the walk that produced the supporting number was memoised, which is the defect this repository
names in section 126 and warns about in CLAUDE.md. A first pass asked whether each keypad map reaches
a 0x7D and threaded one visited set through the whole recursion, so a list seen on one branch was
skipped on every other. The number it produced happened to be right, checked afterwards against
infraredCodesPerList, which does it correctly with a fresh set per list. Right by luck is the outcome
that stops anybody looking.
The test¶
packages/codec/test/inventory.test.ts asserts every count above and, as the assertion that carries the
claim, that no keypad map sends a code without an activity installing it. A sample holding a device
mode map fails there rather than being absorbed. The counterweight is asserted beside it, the 38 maps
that bind the whole keypad and send nothing, so the zero is not read as "there are no other maps".
It is TypeScript rather than Python because the readers are: keyCodes, activities and
infraredCodesPerList live in packages/codec, and the last of those is what the walk has to go
through, per the memoisation failure recorded above.
Section 150 | the archive | section 152. Section 151 of the findings archive, which is frozen; the reference holds the current answer. The archive on GitHub.