The Touch Bar concept is nothing new because it has a similar function to Lenovo's ThinkPad X1 Carbon adaptive keys way back in 2014. While Lenovo scrapped its touch keys after feedback due to the poor implementation, Microsoft has been investigating the use of adaptive keyboards for more than 15 years.
According the The Verge, the concept for adaptive hardware began back in 1999, with an idea that PCs could display action keys and hide other parts of the keyboard based on context. Steven Bathiche, director of research in Microsoft's applied sciences group, spent years investigating keyboards that changed their function keys and actions based on applications on the screen.
While most of the work was primitive compared to today's touchscreen interfaces, a lot of the concepts behind Apple's MacBook Touch Bar were investigated by Microsoft's research teams.
After a number of prototypes involving projectors, touchscreens, and basic keyboard buttons, Microsoft finalized its research in 2009 with what it describes as an "Adaptive Keyboard." Microsoft's Adaptive Keyboard includes a tactile keyboard with a display underneath it, and programmable display key tops, with a large touch display area above the keys.
It's obviously a step further on from Apple's own Touch Bar, but Microsoft experimented with apps and user experiences that extended most of the interactions to the keyboard where hands typically rest. The idea was to see whether touch and dynamic context-based controls on a keyboard could increase productivity and highlight more advanced controls to a regular keyboard user who doesn't rely on 100s of shortcuts. Microsoft even admits part of the research was to "perhaps delight a little bit."
All of the examples in Microsoft's research were purely concept. One example extends the operating system to the keyboard touch area, allowing users to browse through and select documents or recent apps. Another shows how the entire keyboard could adapt for when users don't require QWERTY input on certain actions in apps. Microsoft even investigated enabling notifications to display on the touchscreen area, allowing users to take Skype calls through "quick reach actions" without having to interact with them using a mouse.