Adding Keys

Adding keys to a Hyperkey database

  • To use Hyperkey, it is necessary that you add keys for resources that you wish to be able to manipulate using the program.
  • By default, Hyperkey starts with a single database file, and with only a few example dbrec entries.
  • There are two ways that keys are normally added to a HKDB database file: you can use the 'hkey addkey' command, or you can directly edit the HKDB file using a text editor such as the Windows Notepad program.
  • For beginner users, the safest way is to use the 'hkey servpath' and 'hkey addkey' commands.
  • If the key links two locations (local, server) such as for backup or synchronization, it necessary to first add the server location to the database where the key will be stored, as discussed next.

Adding a server location using 'hkey addserv'

  • hkey addserv [<server-path>]
    • Adds a 'server' location to a database. This is a necessary first step when creating keys that do backup or synchronization.
    • NOTE: It is not needed for keys that only have a 'local' binding.
    • To use 'addserv':
      • Open a command window to the folder location where the 'server' copy will be stored:

        If you have installed Hyperkey:

        • Open Windows Explorer, and navigate to the folder where the 'server' copy will be stored.
        • Right-click on the target folder, and choose 'Hyperkey'. This will launch a Windows command window, with the current directory set to that folder.

        If you have not installed Hyperkey:

        • Start a Windows command window by going to the 'Start' menu and entering 'cmd' in the 'Search programs and files' box.
        • Change directories to the folder location where the 'server' copy will be stored, using the 'cd' command.
      • Start the 'hkey addserv' command, and pass the server file location as the <server-path> argument.
    • For example:
      • cd "X:\Ar\MyDocs\Books"
        hkey addserv .

    • The <server-path> argument will hold the directory that will be inserted as the 'server' path. You can pass any Windows path you wish. If the current directory is the one desired, such as in the example above, you may pass either '.' or omit the argument entirely.
    • Hyperkey will then prompt you for which database file to add the path, and where you wish to insert the path within that database.

Adding a key using 'hkey addkey'

  • hkey addkey <key> [<local-path>] [<server-path>]
    • Adds a new key binding to a database.
    • NOTE: If creating a key that requires two locations (local, server), such as for backup or synchronization, it is generally easiest to insert the server path before adding the key bindings. (See 'Adding a server location using 'hkey addserv'' above.)
    • To use 'addkey':
      • Open a command window to the folder location of the 'local' file or folder for the key.

        If you have installed Hyperkey:

        • Open a Windows explorer window, and navigate to the folder containing the file or folder for the local path.
        • Right-click on the target file or folder, and choose 'Hyperkey'. This will launch a Windows command window, with the current directory set to that file or its folder.

        If you have not installed Hyperkey:

        • Start a Windows command window by going to the 'Start' menu and entering 'cmd' in the 'Search programs and files' box.
        • Change directories to the folder containing the file or folder for the local path, using the 'cd' command.
      • Start the 'hkey addkey' command, passing the key name as an argument.
    • For example:
      • cd "C:\Users\Myuser\MyDocs\Books"
        hkey addkey mybook

    • Hyperkey will then prompt you for which database file to add the key, and where you wish to insert the key within that database.

Modifying a key using 'hkey modkey'

  • hkey modkey <key>
    • Modifies an existing key binding in a database.
    • To use 'modkey':
      • Open a command window.
        • If you have installed Hyperkey:
          • Open a Windows explorer window
          • If you are modifying the 'local' or 'server' paths, then navigate to the location of the local or server folder.
          • Right-click on any file within the folder, and choose 'Hyperkey'. This will launch a Windows command window, with the current directory set to that file or its folder.
        • If you have not installed Hyperkey:
          • Start a Windows command window by going to the 'Start' menu and entering 'cmd' in the 'Search programs and files' box.
          • If you are modifying the 'local' or 'server' paths, change directories to the location of the local or server folder using the 'cd' command.
      • Start the 'hkey modkey' command, passing the key name as an argument.
    • For example:
      • cd "X:\Ar\MyDocs\Books"
        hkey modkey mybook

    • Hyperkey will locate the dbrec of the key, and then prompt you for what you wish to change.
Previous: Hyperkey Database Basics Next: Basic Hyperkey Commands