-
-
Notifications
You must be signed in to change notification settings - Fork 1
Symbols
When you define a DynamicKey
, it can be given a label and/or a symbol. If it has both a label and a symbol, it will show the symbol by default, and switch to the label when you look directly at it.
<DynamicKey>
<Label>Left</Label>
<Symbol>LeftArrowKeyIcon</Symbol>
<Action>ArrowLeft</Action>
</DynamicKey>
The possible values for the symbol can be
- one of the built-in Optikey symbols listed here: Optikey symbols; or
- an icon from Google's Material Design icon library listed here: MaterialDesign symbols; or
- an icon in the RPG-Awesome icon list here: RPG Awesome symbols
- a
Geometry
extracted from an SVG, e.g.
<Symbol>M 21,8 H 15 C 14.4,8 14,7.6 14,7 14,6.4 14.4,6 15,6 h 6 c 0.6,0 1,0.4 1,1 0,0.6 -0.4,1 -1,1 z m 0,10 h -5.4 c -0.7,0 -1.4,-0.4 -1.7,-1 L 8.4,8 H 3 C 2.4,8 2,7.6 2,7 2,6.4 2.4,6 3,6 h 5.4 c 0.7,0 1.4,0.4 1.7,1 l 5.4,9 H 21 c 0.6,0 1,0.4 1,1 0,0.6 -0.4,1 -1,1 z</Symbol>
As an example of the different symbols available in Optikey, this keyboard shows various arrows, and the difference between keys with either symbol, label or both:
Full keyboard XML
<Keyboard>
<Name>Arrow keys</Name>
<WindowState>Docked</WindowState>
<Position>Bottom</Position>
<Width>100%</Width>
<Height>15%</Height>
<Grid>
<Rows>1</Rows>
<Cols>10</Cols>
</Grid>
<Content>
<DynamicKey>
<Label>Left</Label> <!-- Label with no symbol -->
<Action>ArrowLeft</Action>
</DynamicKey>
<DynamicKey>
<Label>Left</Label> <!-- This key has label *and* symbol -->
<Symbol>ArrowPointingToLeftIcon</Symbol> <!-- from Optikey -->
<Action>ArrowLeft</Action>
</DynamicKey>
<DynamicKey>
<Symbol>LeftArrowKeyIcon</Symbol> <!-- symbol from Optikey, no label -->
<Action>ArrowLeft</Action>
</DynamicKey>
<DynamicKey>
<Symbol>KeyboardArrowLeft</Symbol> <!-- from MaterialDesign icon library -->
<Action>ArrowLeft</Action>
</DynamicKey>
<DynamicKey>
<Symbol>ArrowBack</Symbol> <!-- from MaterialDesign icon library -->
<Action>ArrowLeft</Action>
</DynamicKey>
<DynamicKey>
<Symbol>ArrowForward</Symbol> <!-- from MaterialDesign icon library -->
<Action>ArrowRight</Action>
</DynamicKey>
<DynamicKey>
<Symbol>KeyboardArrowRight</Symbol> <!-- from MaterialDesign icon library -->
<Action>ArrowRight</Action>
</DynamicKey>
<DynamicKey>
<Symbol>RightArrowKeyIcon</Symbol> <!-- from Optikey -->
<Action>ArrowRight</Action>
</DynamicKey>
<DynamicKey>
<Label>Right</Label> <!-- label and symbol -->
<Symbol>ArrowPointingToRightIcon</Symbol> <!-- from Optikey -->
<Action>ArrowRight</Action>
</DynamicKey>
<DynamicKey>
<Label>Right</Label> <!-- label only -->
<Action>ArrowRight</Action>
</DynamicKey>
</Content>
</Keyboard>
You may also find that instead of an actual icon you can use a emoticon or other symbol as a Label
. You may need to google for the symbol and copy-paste it into your XML file. For instance:
<DynamicKey>
<Label>Ⓐ</Label>
<KeyPress>XboxA</KeyPress>
</DynamicKey>
<DynamicKey>
<Label>Ⓑ</Label>
<KeyPress>XboxB</KeyPress>
</DynamicKey>
<DynamicKey>
<Label>Ⓧ</Label>
<KeyPress>XboxX</KeyPress>
</DynamicKey>
<DynamicKey>
<Label>Ⓨ</Label>
<KeyPress>XboxY</KeyPress>
</DynamicKey>