How To Create a Custom Keyboard Shortcuts Remote
If you want a remote that can execute different keyboard shortcuts on your computer then you can create a Custom Remote for this.
The latest version of Unified Remote Server comes with some basic custom remote examples, including an example of a custom Keys remote. We will use that has a starting point. They are located in:
Windows:
C:\ProgramData\Unified Remote\Remotes\Bundled\Unified\Examples
Mac:
~/Library/Application Support/Unified Remote/Remotes/Bundled/Unified/Examples
Start by creating a copy of the Keyboard example remote. Copy the "Keys" folder and give it a name. For example, let's create a custom Keyboard Shortcut remote for "Windows".
Open the folder, and you should see four files. The layout file defines how your remote should look, the meta file describes the name/author etc. The remote file contains the keyboard shortcuts code for each button.
Start by opening the meta file in a text editor. Give it a fitting name, author, and description. You must give it a new name (two remotes can't have the same name). Save and close the file.
Next, have a look at the layout file, also in a text editor. Layouts typically include some rows, and each row has one or more buttons. The text field gives it a name, and "ontap" tells the remote which action to run (we'll get to that later). Let's close the file for now.
Now open the remote file in a text editor. This file defines what Keyboard shortcuts to run for each action. Note how the "ontap" field matches the action names. This is important if you wish to add more buttons and actions.
Now if you do not already know the keyboard shortcuts for the program, you like to control you need to start searching. Normally searching for "
In this case I was looking for windows keyboard shortcuts and searched for "Windows Keyboard shortcuts".
I found that the second link returned the information I needed. Now we need to decide what keyboard shortcuts we need. I find that I use "Copy", "Paste", "Cut" and "Undo" a lot so lets use these in our example.
Time to edit our Layout for what we like to control. A button can either have a text or a icon (You can find all the possible icons here). As you see in the image below the first three buttons have a text and the last button have a Icon.
Now we need to create the logic for what should happen when you push one of the buttons in the remote. To change this go to the remote.lua file. Here you need to change the name of the actions to match what you wrote in your layout. You also need to change the keys in each "stroke" (You find available keys here). Also change the help text to reflect what the action do.