Touch Bar Customization

broken image


Parallels Program Manager guest author: Alex Sursiakov

  1. Touch Bar Customization App
  2. Touch Bar Macbook Customization
  3. Touch Bar Customization Free
  4. Touch Bar Modify
  5. Touch Bar Mac

Touch Bar Support in Parallels Desktop for Mac

During customization, a user can manipulate the array of items, but strictly as a unit: If the (noncustomizable) group Touch Bar bar is visible in the Touch Bar, the user can remove it as a unit, or can rearrange it among the other items in the group Touch Bar bar; if the group Touch Bar bar is instead visible in the customization UI, the user. Customize Touch Bar on MacBook Pro. Note: This guide is only applicable with the 2016 or 2017 MacBook Pro with Touch Bar. If you have a notebook with a row of hardware function keys then you can.

With Parallels Desktop® 13 for Mac (and Parallels Desktop® 14, as well), Mac® users can use Touch Bar™ for Windows applications. This function is supported in Windows 7, Windows 8, and Windows 10.

To see App Controls in Touch Bar, make sure that some of the options with App Controls are selected in macOS® System Preferences → Keyboard pane.

(Figure A)

A Mac with Touch Bar is highly recommended. However, if you are trying to decide if it's worth it, you can try a Touch Bar emulator like Touche on your Mac without Touch Bar. There are more than 100,000 different Windows applications that users run on a Mac with the help of Parallels. Some applications have predefined sets of Touch Bar commands, and others do not—it is impossible to support all of them.

Applications with predefined commands are: Weather dock 4 2 0 – desktop forecast 7 day.

  1. File Explorer
  2. Browsers (Microsoft Edge, Internet Explorer, Firefox, Chrome™, Opera, Vivaldi)
  3. Microsoft Outlook
  4. Microsoft Word and Word Mobile
  5. Microsoft Excel and Excel Mobile
  6. Microsoft PowerPoint and PowerPoint Mobile

There is also a set for Windows Desktop and Start Menu that you can customize by pinning your favorite applications to Windows Task Bar.

Task Bar:

(Figure B)

Touch Bar:

(Figure C)

So, what about other applications?

Default Touch Bar Customization

By default for all other applications, we show Functional keys:

(Figure D)

However, you can start an application and customize this set. Go to View menu and select 'Customize Touch Bar .'

(Figure E)

You will see the following interface, where you can pretty much do what is asked: 'Drag items into the Touch Bar…'

(Figure F)

If you don't see the menu, it may be that you have enabled Functional keys for Parallels Desktop in macOS System Preferences → Shortcuts → Function Keys. Just remove Parallels Desktop from the list.

What if buttons that we have in this dialog don't fit your needs?

Advanced Touch Bar Customization

There is a way to customize Touch Bar for any application.

All you need is to figure out how to complete the action with a keyboard, and some patience to fine-tune things.

If you are not tech savvy, then get ready to fail, fight, and ultimately succeed.

Note: Parallels doesn't officially support this way of Touch Bar customization, so you are doing it at your own risk.

Set the Goal

First you need to understand what you want and how to achieve it.

For example, I am using Notepad++ to edit an HTML file, and I like to check how the webpage looks in different browsers.

Notepad++ has these shortcuts at hand:

(Figure G)

Ctrl + Alt + Shift + . I am not a fan of gymnastics for fingers, so I want to end up with this in Touch Bar:

(Figure H)

This is important: for an action you want to see in Touch Bar, you need to be able to achieve it using your keyboard. If this is possible, then you can create a Touch Bar button for this action.

Get Ready

Make a backup.

Parallels Desktop is an amazing software, and making a Windows backup is super easy.

In Window mode, select 'Actions → Manage Snapshots…' and select 'New…' here. You can also reach this item from Control Center, the Parallels icon in the menu bar, or the Windows icon in the Dock. When you are done with Touch Bar customization, you can remove the Snapshot to release disk space.

(Figure I)

Read more about snapshots here.

Add a Button

To explain to Parallels Desktop what you want to see in the Touch Bar for a certain application, you need to have an XML file with a certain name in a certain location. Datagrip 2016 2 2 – new database ide.

In this XML file, you will describe Touch Bar buttons.

Let's create a folder:

  1. Open Windows File Explorer and enter %LOCALAPPDATA% in the path field and press Enter:
    (Figure J)
  2. In most cases, it will open the 'User name' > AppData > Local folder.
  3. In this folder, create a new folder named 'Parallels'; in the Parallels folder, create a folder named 'CustomTouchBars'.
    So now it is likely to be C:UsersAppDataLocalParallelsCustomTouchBars

Then create a file. It is beneficial to use some editor with XML support. I will use the same Notepad++.

Text for the file:

(Figure K)

Now we need to name this file properly to indicate that it is for a certain application.

Proper name format: .exe.xml

For Notepad++, it is

notepad++.exe.xml

(Note: Sometime text processing apps will automatically change all quote marks into typographically correct quotes (also sometimes called 'curly quotes'). In ordinary language, this is usually correct. For computer code (HTML, XML, or programming language text), this is usually incorrect and will prevent your code from working as expected. When you are typing any type of code, if you see this conversion taking place, make sure you turn it off. Figure K1 shows two such settings.)

Here is how to find it:

(Figure L)

(Figure M)

Note: Sometime apps will 'help' you by automatically adding a file type to any file name you enter. In the case of file you name as 'notepad++.exe.xml', this might result in the file being named 'notepad++.exe.xml.xm'. For the advanced Touch Bar customization work, a file name like this will not work. You will have to ensure that the app does not add anything to the file name.

Now let's verify it's working. Reboot Windows, start your application, and check the Touch Bar.

If it's working, you will see the following:

(Figure N)

Clicking the Button will quit the application in most cases.

If it doesn't work, please make sure that you have done everything properly. If nothing helps, revert to the snapshot that you have created and repeat.

Customize the Button

For each button, we can customize the following:

  • id – Mandatory field. Unique identifier of the element.
  • keyCode – Mandatory field. Specifies shortcut sequence.
  • title – Optional. Specifies text on the button.
  • width – Optional. Specifies the width of the button, in points.
  • image – Optional. Specifies the image on the button. See 'Images'.
  • backColor – Optional. Specifies background color of the button in RRGGBB format.
  • textColor – Optional. Specifies text color of the button in RRGGBB format.

Attribute names are case sensitive.

keyCode

*Note: You must specify keyCode for every button you have.*

In the keyCode parameter, you can pass one key, several keys, or a combination of them. They will go to the applications as if you have typed/pressed them.

To pass a combination, use +.

To pass '+', use plus.

To pass several keys in a row, use ','. Drama 2017.

To pass ',' use comma.

Here is a full list of keyCodes:

  • Characters: a-z
  • Numbers: 0-9
  • Functional keys: f1-f24
  • Other keys: /*=[]`.,comma,semicolon,ins,del,home,end,pgup,pgdown,prtSc,break,ctrl,alt,shift,win,fn,scroll_lock,esc,left,right,up,down,space,tab,minus,np_minus,plus,enter, www_back,www_forward,www_search,www_home,www_stop,www_refresh,www_favorites,app_mail,app_calculator,app_computer,menu.

title

This one is easy. Specify the title text you want to see on a button. If no title or image is specified, then the keyCode will be used as a title.

width

This one is easy, too. Specify the width of the button in points. You may need to play with this, but here are some examples to get an idea:

(Figure O)

image

You may use standard images as per Apple® documentation.

For example, I like the 'Open in Browser' icon:

(Figure P)

I click a link and get a constant:

(Figure Q)

I then remove ImageName from the constant name and get 'NSTouchBarOpenInBrowserTemplate'

Then I can add it to the Touch Bar button like this:

Now Touch Bar will look like this:

(Figure R)

You may define custom images in xml file, but that won't look pretty. Specify image='base64:2x:'. Recommended image size is 36x36px; maximum is 60x60px.

I won't dig into details here, but the Firefox icon will look like this:

(Figure S)

backColor and textColor

If you feel fancy, specify colors:

(Figure T)

Add a Second Button

Adding the second button can be done by creating another copy of a Button section and adding its id to the list of defaultItemIdentifiers of the TouchBar element.

(Figure U)

To get what I initially wanted for Notepad++, the code will look like this:

More Customizations for Tech-Savvy Users

At this point, you should be good. But if you are tech-savvy and comfortable with stuff like this—and want to invest more time into your Touch Bar customization—there are more elements and things to play with.

TouchBar element

The root element of an XML document. Defines elements which are displayed on Touch Bar.

  • defaultItemIdentifiers – Mandatory. An array of comma-delimited identifiers of buttons included. Identifiers must point to the element of the document with the same 'id' attribute or special identifiers:

Touch
    • NSTouchBarItemIdentifierCharacterPicker – smiles button
    • NSTouchBarItemIdentifierFlexibleSpace – flexible space
    • NSTouchBarItemIdentifierFixedSpaceSmall – small fixed space
    • NSTouchBarItemIdentifierFixedSpaceLarge – large fixed space
  • escapeKeyReplacementItemIdentifier – Optional. Identifier of a button which replaces Escape key.
  • principalItemIdentifier – Optional. Identifier of an item which is displayed in the center of Touch Bar.

SegmentedControl element

Container element which specifies what buttons are displayed together. Should contain children Segment sub-elements.

  • trackingMode – Mandatory. Must specify 'momentary'.
  • separated – Optional. Should specify 'true' if buttons are displayed separately.

Segment sub-element

  • keyCode – Mandatory. Specifies shortcut sequence.
  • title – Optional. Specifies text on the button.
  • image – Optional. Specifies image on the button. See 'Images'.
  • width – Optional. Specifies the width of the button, in points.

Touch Bar Customization App

Popover element

The element which specifies what button expands into a separate Touch Bar set. May show different sets for the press-and-hold scenario.

Should contain PopoverTouchBar, and may contain PressAndHoldTouchBar sub-elements that have a schema identical to other Touch Bar elements.

  • title – Optional. Specifies text on the button.
  • Image – Optional. Specifies the image on the button. See 'Images'.

ScrollView element

The container element that shows buttons in a scrollable area. Should contain child Button elements with a defined width.

Group element

The container element for other elements. May contain any child elements.

Example

Application States

Sometimes you want to see different Touch Bar sets based on the context you have in your application. Unfortunately, this is not possible at the moment.

If you create a useful set of Touch Bar buttons for your Windows application and feel like you want to share it with others, feel free to reply here or post on Parallels forums. We also encourage you to share on Facebook or Twitter and tag us to show us your work! We'd love to share it with other users.

Interested in using the Mac Touch Bar on your Mac with Windows programs? Try our 14-day free trial here!

Touch Bar Overview

The Touch Bar is a Retina display and input device located above the keyboard on supported MacBook Pro models. Dynamic controls in the Touch Bar let people interact with content on the main screen and offer quick access to system-level and app-specific functionality based on the current context. For example, when people type text in a document, the Touch Bar could include controls for adjusting the font style and size. Or when viewing a location on a map, the Touch Bar could offer quick, one-tap access to nearby points of interest.

The following guidelines can help you provide a Touch Bar experience that people appreciate. For developer guidance, see NSTouchBar and Xcode Help.

Configuration and Customization

Touch Bar Macbook Customization

A Touch ID sensor to the right of the Touch Bar supports fingerprint authentication for logging into the computer and approving App Store and Apple Pay purchases. On devices that include the Touch Bar (2nd generation), a physical Esc (Escape) key appears to the left of the Touch Bar.

By default, the right side of the Touch Bar displays an expandable region called the Control Strip that includes controls for performing system-level tasks such as invoking Siri, adjusting the brightness of the main display, and changing the volume. You can place app-specific controls in the app region to the left of the Control Strip. In Touch Bar (1st generation), an Esc button or other system-provided button may appear to the left of the app region, depending on the context.

People can configure the Touch Bar to suit their needs. For example, people can remove items from, or hide the Control Strip completely, in which case only the controls in the app region and the system button remain. Alternatively, people can hide the app region to view an expanded Control Strip.

You can support additional customization within the app region by letting people add and remove items.

In general, let people customize your app's Touch Bar experience. Provide reasonable defaults for important and commonly used functions, but let people make adjustments to support their individual working styles.

Provide alternative text labels for your Touch Bar controls.By providing alternative text for your controls in the Touch Bar, VoiceOver can audibly describe the controls, making navigation easier for people with visual impairments. (For guidance, see Accessibility.) Also create labels for any customizable Touch Bar controls that you provide so VoiceOver can describe these controls on the customization screen.

Gestures

People use a subset of the standard gestures to interact with the Touch Bar.

Tap

People tap to activate a control, like a button, or select an item, such as an emoji, a color, or a segment in a segmented control.

Touch and Hold

A touch and hold gesture initiates a control's secondary action. In Mail, for example, tapping the Flag button adds a flag to a message, but touching and holding the button reveals a modal view that lets people change the flag's color.

Horizontal Swipe or Pan

People use a horizontal swipe or pan to drag an element, like a slider thumb, or navigate through content, such as a list of dates or a group of photos in a scrubber.

Multi-Touch

Although the Touch Bar supports Multi-Touch gestures — like a pinch — such gestures can be cumbersome for people to perform. In general, it's best to use Multi-Touch gestures sparingly.

Design Fundamentals

Keep the following guidance in mind as you design your app's Touch Bar interfaces.

Make the Touch Bar relevant to the current context on the main screen. Identify the different contexts within your app. Then, consider how you can expose varying levels of functionality based on how your app is used.

Use the Touch Bar as an extension of the keyboard and trackpad, not as a display. Although the Touch Bar is a screen, its primary function is to serve as an input device — not a secondary display. People may glance at the Touch Bar to locate or use a control, but their primary focus is the main screen. The Touch Bar shouldn't display alerts, messages, scrolling content, static content, or anything else that distracts people from the main screen.

Strive to match the look of the physical keyboard. When possible, aim to design Touch Bar controls that resemble the size and color of keys in the physical keyboard.

Avoid making functionality available only in the Touch Bar. Not all devices have a Touch Bar, and people can disable app controls in the Touch Bar if they choose. Always give people ways to perform tasks using the keyboard or trackpad.

In a full-screen context, consider displaying relevant controls in the Touch Bar. In full-screen mode, apps often hide onscreen controls and reveal them only when people call for them by, for example, moving the pointer to the top of the screen. If you support full screen, you can use the Touch Bar to give people persistent access to important controls without distracting them from the full-screen experience.

Prefer controls that produce immediate results. Ideally, Touch Bar controls give people quick ways to perform actions that would otherwise require extra time spent clicking controls or choosing from menus. Minimize Touch Bar controls that present additional choices, such as popovers. For guidance, see Controls and Views.

Touch Bar Customization Free

Be responsive to Touch Bar interactions. Even when your app is busy doing work or updating the main screen, respond instantly when people use a Touch Bar control.

Touch Bar Modify

When possible, people should be able to start and finish a task in the Touch Bar. Avoid making people switch to the keyboard or trackpad to complete a task unless the task requires more complex interface controls than the Touch Bar provides.

Avoid using the Touch Bar for tasks associated with well-known keyboard shortcuts. The Touch Bar shouldn't include controls for tasks such as find, select all, deselect, copy, cut, paste, undo, redo, new, save, close, print, and quit. It also shouldn't include controls that replicate key-based navigation, such as page up and page down.

Touch Bar Mac

Accurately reflect the state of a control that appears in both the Touch Bar and on the main screen. For example, if a button is unavailable on the main screen, it shouldn't be available in the Touch Bar.

When responding to user interactions, avoid showing the same UI in both the Touch Bar and the main screen. For example, when people click the onscreen Emoji & Symbols button in a new message window in Mail, they expect the Character Viewer to open on the main screen, not in the Touch Bar. Unless people interact with the same control in both places, avoid distracting people by displaying redundant UI.





broken image