Editing Braille Command Property Lists

From The iPhone Wiki
Revision as of 21:56, 28 August 2013 by Britta (talk | contribs) (improving formatting (code blocks))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The files needed for editing the braille display keystrokes are two. One, needed for informational purposes only, is located in the English.lproj directory and is called InfoPlist.strings This file contains mappings of the names of buttons on the braille display to button codes. The button codes are what are used in the specific .plist file for the display, and these codes are in turn mapped to commands which are executed when the buttons are pressed.

An example of the button name to code mappings from the Alva InfoPlist.strings

<key>com.apple.scrod.braille.driver.alva.6.series.65536</key>
<string>Router Row 1</string>
<key>com.apple.scrod.braille.driver.alva.6.series.65537</key>
<string>Thumb 1</string>
<key>com.apple.scrod.braille.driver.alva.6.series.67841</key>
<string>Smartpad 1</string>
<key>com.apple.scrod.braille.driver.alva.6.series.69633</key>
<string>Smartpad 3</string>
	<key>com.apple.scrod.braille.driver.alva.6.series.68865</key>
	<string>Smartpad Up</string>

These are the button codes needed in the .plist file for one's particular display. How these button codes are determined is not known. Some of the English button names are cryptic, but most can be figured out and, if real difficulties come up in this, one can always assign the unknown button codes to a known command, go into the practice VoiceOver gestures application, and hit the possible buttons until one gets the right command. Practice VoiceOver Gestures will announce the name of the button/buttons used.

An example of the button code to command mapping from com.apple.scrod.braille.driver.alva.6.series.BC640.plist

<dict>
	<key>SCRBrailleInputIdentifier</key>
	<string>68865</string>
<key>SCRCommand</key>
	<string>VOTEventCommandSearchRotorUp</string>
</dict>

To modify what the buttons do, it is simply necessary to change the command keyword, in this case "SearchRotorUp", to one of the other keywords. A list of keywords is below. Most are in plain English, and will be simple for any user who's used iOS. To modify what buttons perform the command, all that's needed is to change the button code to the desired button or buttons. For example, the above command mapping maps the up arrow on the display to the swipe up on the touch screen, getting to the previous item using the rotor. If one wanted smartpad 3 to do this, it would be changed to the below:

<dict>
	<key>SCRBrailleInputIdentifier</key>
	<string>69633</string>
	<key>SCRCommand</key>
	<string>VOTEventCommandSearchRotorUp</string>
</dict>

If one wanted to change the up arrow to do a flick left, one would change the above mapping like this:

<dict>
	<key>SCRBrailleInputIdentifier</key>
	<string>68865</string>
<key>SCRCommand</key>
	<string>VOTEventCommandPreviousElement</string>
</dict>

If one wants to have multiple buttons pressed together perform an action, one enters the button codes separated by a period into the button code designation string field. This example has two buttons on the Baum braille display perform the swipe down to search for the next item according to the rotor. It can be found in com.apple.scrod.braille.driver.baum.varioconnect.12.plist

<dict>
		<key>SCRBrailleInputIdentifier</key>
		<string>66818.67586</string>
		<key>SCRCommand</key>
	<string>VOTEventCommandSearchRotorDown</string>
	</dict>

This is a list of all the braille command keywords known so far:

  • BrailleRouter
  • BrailleStatusRouter
  • PreviousElement
  • NextElement
  • SearchRotorUp
  • SearchRotorDown
  • SimpleTap
  • SearchRotorLeft
  • SearchRotorRight
  • FirstElement
  • LastElement
  • ReadAll
  • ReadFromTop
  • HomeButtonPress
  • MoveToStatusBar
  • VolumeUpButtonPress
  • VolumeDownButtonPress
  • Escape
  • EjectButtonPress
  • Delete
  • Return
  • Tab
  • ShiftTab
  • Cut
  • Copy
  • Paste
  • Undo
  • Redo
  • SelectAll
  • ToggleScreenCurtain
  • ToggleSpeaking
  • ToggleMute
  • StartHelp
  • ScrollLeftPage
  • ScrollRightPage
  • SelectLeft
  • SelectRight
  • BraillePanLeft
  • BraillePanRight
  • BrailleAnnouncementModeOn
  • BrailleToggleContractions