A Wild and Crazy Touch Bar!

My colleague, Alex Sursiakov, wrote an excellent blog post on the Touch Bar™. In his post, Advanced Touch Bar Customization with Parallels Desktop, Alex detailed an advanced way to implement Touch Bar button sets, which gives the user many additional design options that are not available using the Touch Bar customization features built into Parallels Desktop® 13 for Mac.  This additional power, however, comes at a price: You have to write XML code to describe the Touch Bar button set, unlike the easy, drag-and-drop Touch Bar customization tool in Parallels Desktop 13.

I decided to try out this advanced approach. After several false starts and a little bit of cursing, I was able to implement a wild and crazy Touch Bar. (See Figure 1.)

Touch Bar

(Figure 1)

Here is the XML code that implements this Touch Bar:

<TouchBar id="notepad++" defaultItemIdentifiers="button1,button2,NSTouchBarItemIdentifierFixedSpaceLarge,button3,button4,button5,NSTouchBarItemIdentifierCharacterPicker">
    <Button id="button1" keyCode="alt+f4" title="This" backColor="FC1D00" textColor="FFFFFF"/>
    <Button id="button2" keyCode="alt+f4" title="is" width="90" backColor="FFFB00" textColor="000000"/>
    <Button id="button3" keyCode="alt+f4" title="" width="30" image="NSTouchBarColorPickerFont" backColor="00FC1D" textColor="000000"/>
    <Button id="button4" keyCode="alt+f4" title="Wild and Crazy" width="190" image="NSTouchBarColorPickerFill" backColor="4B9454" textColor="000000"/>
    <Button id="button5" keyCode="alt+f4" title="Touch Bar!" width="160" backColor="FA7602" textColor="FFFFFF"/>

This code probably won’t mean much to you if you haven’t already read Alex’s post.
Figure 2 shows this code in my Windows 10 virtual machine.

(Figure 2)

Some notes about my experience:

Learning a little about XML and implementing a Touch Bar button set in XML gives you a lot more power. But as Spiderman’s Uncle Ben once said:

With great power comes great responsibility.

My next task is to design and implement a useful Touch Bar button set for some Windows application. Stay tuned.

Interested in customizing the Mac Touch Bar for Windows programs in Parallels Desktop? Get started with our 14-day free trial.