A patent titled "ONE-WAY VISIBILITY KEYCAPS" (via Patently Apple (opens in new tab)) was filed in June of last year and has now been officially published by the USPTO. It describes Apple's idea for a keyboard that can show "different shapes, letters, colors, symbols, animations, languages, and other features" on its keys when required.
Keys with symbols to tell you what each key does, and backlights to help make those keys easier to see, are familiar parts of a keyboard. However, the limitation of this style is that the keys are often made of cheaper materials than the rest of the keyboard/laptop, with the key glyphs added in paint or as a coating on top. These can wear off over time, or just feel cheap and unpleasant to use, hence why Apple's looked into this as an alternative.
The keyboard in the patent is constructed like any other keyboard, with a baseplate, a switch and a keycap, except the keycap has holes cut in it and multiple backlights beneath it.
These backlights can light up different parts of the cutout,, allowing one key to show multiple symbols.
The patent also considers achieving this dynamic keyboard with micro-LEDs or OLED, self-lighting pixels that could be even more customizable than a regular backlight. It also mentions making keys of different materials, such as aluminum, the material Apple uses for the rest of its MacBook bodies. So these keys would not only be smarter than your average keyboard but could also blend in better with the laptop they're mounted on.
Patents are just an inventor's claims to their ideas, not guarantees we'll ever see the type of product it describes actually make it to market. But this transforming keyboard doesn't sound completely outlandish, and could be excellent for reminding users where specific shortcuts are in common apps, or simply allow different keyboard layouts to be displayed on the same hardware.
That said, Apple's tried to reinvent the keyboard before, without much success. While the current Magic Keyboard design used on Mac and iPad keyboards is lovely to use, the previous Butterfly Keyboard design proved to be unreliable and unpopular.
We also had the Touch Bar on previous MacBooks that offered some of the same dynamic benefits as this keyboard patent does, only it has also disappeared due to lack of meaningful uses. Maybe Apple's better off sticking with traditional keyboards for the time being until this design is thoroughly ironed out.
The next-gen MacBook Pro with M2 Pro is expected to arrive early next year, with only minimal changes from the current 14-inch MacBook Pro and 16-inch MacBook Pro. It'll likely have a new chipset inside offering enhanced performance, but nothing as major as a new keyboard like the one the patent describes. It could be a number of years and MacBook generations before we see anything like this actually up for sale.