Skip to content

Examples for modifying keyboard XML files

kmcnaught edited this page Jul 22, 2020 · 1 revision

If you plan to modify the keyboards yourself, you will first need to make a local copy of them.

Setup

  • Right click on the EyeMine keyboard, and click "Management Console (Settings)".
  • Change the Startup keyboard to "Custom folder containing dynamic keyboards"
  • Click "Create copy of built-in keyboards"
  • Select a folder (for instance, "My Documents") where you want the folder of keyboards to live.
  • EyeMine will now load keyboards from your personal copy, and you can go into this folder and make changes!

Example 1: Copying a key from one keyboard to another.

Say you want to add the "Toggle Use" key to the main keyboard, so you can eat more easily. There is currently no spare space on it, so you'll have to replace one of the existing keys - for instance, you might not need "Swap mine & place" if you don't use a switch.

  • Open MinecraftBuild.xml from the Bonus folder
  • Search for "use item" and you will find this chunk, which defines the "Toggle use item" key
    <DynamicKey>
      <Label>Toggle\nuse item</Label>
      <Symbol>MouseRightDownUpIcon</Symbol>
      <Action>NumPad1</Action>
    </DynamicKey>
  • Open 3_MC_MainKeyboard.xml in a text editor
  • Find the key you're planning to replace, for instance:
    <DynamicKey Height="2">
	<Label>Swap mine\nand place</Label>
	<Symbol>MinecraftSwapMinePlace</Symbol>
	<Action>F10</Action>
    </DynamicKey>

You'll note that the keys on this keyboard have a height of 2, to help give a layout with a short title bar along the top of the keyboard. You'll want your new key to have a height of 2 also.

  • Copy the chunk of XML from the other file, to replace this one, and add the Height="2" attribute (alternatively, just copy everything inside the DynamicKey lines, so you still keep the Height="2" attribute). It should now look like this:
    <DynamicKey Height="2">
	<Label>Toggle\nuse item</Label>
        <Symbol>MouseRightDownUpIcon</Symbol>
        <Action>NumPad1</Action>
    </DynamicKey>

Reload the keyboard in EyeMine and test it out!

Another example

Adding the "attack" key to the builders keyboard.

  • Search inside 3_MC_MainKeyboard.xml for the "attack" key.
  • Search inside MinecraftBuild.xml for an empty key, for instance:
    <DynamicKey>
      <!-- empty key to pad auto-layout -->
    </DynamicKey>
  • Copy and paste!