{
  "name": "Keyboard Generic",
  "idmatcher": "Keyboard.*",
  "mapping":
  {
    // standard navigation, we allow num and shift modifiers
    "(Num\\+|Shift\\+)?Left": "left",
    "(Num\\+|Shift\\+)?Right": "right",
    "(Num\\+|Shift\\+)?Up": "up",
    "(Num\\+|Shift\\+)?Down": "down",
    "(Num\\+)?(Return|Enter)": "enter",
    "Space": "space",
    "(Esc|Backspace)": "back",

    // map Num+X and Shift+X to X. This allows normal number input
    "(?:Num\\+|Shift\\+)?([0-9])": "%1",

    // map some other normal buttons that might be useful
    "(?:Shift\\+)?(\\.|\\-|\\:|\\_)": "%1",

    // map Shift+Letter to action jump+letter
    "Shift\\+([A-Z])": "jump+%1",

    "P": "play_pause",
    "Ctrl\\+P": "pause",
    "X": "stop",
    "B": "back",
    "H": "home",
    "A": "cycle_audio",
    "Ctrl\\+A": "cycle_audio_back",
    "L": "cycle_subtitles",
    "Ctrl\\+L": "cycle_subtitles_back",
    "S": "toggle_subtitles",
    "Alt\\+A": "increase_audio_delay",
    "Alt\\+Shift\\+A": "decrease_audio_delay",
    "Alt\\+S": "increase_subtitles_delay",
    "Alt\\+Shift\\+S": "decrease_subtitles_delay",
    "PgUp": "seek_backward",
    "PgDown": "seek_forward",
    "Home": "step_backward",
    "End": "step_forward",

    // application shortcuts
    "Ctrl\\+F": "host:fullscreen",
    "Ctrl\\+Q": "host:close",
    "Ctrl\\+Shift\\+R": "host:reload",
    "Ctrl\\+Shift\\+D": "host:toggleDebug",

    // also use I for debug emulating old PHT behaviour
    "I": "host:toggleDebug",

    // media keys from the FLIRC and on Linux keyboards
    "Toggle Media Play\\/Pause": "play_pause",

    // Microsoft Windows Media Center SE; Logitech Harmony device
    "Media Pause": "pause",
    "Media Play": "play_pause",
    "Media Stop": "stop",
    "Media Rewind": "seek_backward",
    "Media Fast Forward": "seek_forward",
    "Media Previous": "step_backward",
    "Media Next": "step_forward",
    "Back": "back",

    // Windows Media Center keyboard shortcuts
    "Alt\\+(Return|Enter)": "host:fullscreen",
    "Ctrl\\+P": "pause",
    "Ctrl\\+Shift\\+P": "play_pause",
    "Ctrl\\+Shift\\+S": "stop",
    "Ctrl\\+Shift\\+B": "seek_backward",
    "Ctrl\\+Shift\\+G": "seek_forward",
    "Ctrl\\+B": "step_backward",
    "Ctrl\\+G": "step_forward",

    // debug command to crash the host. for testing
    "Ctrl\\+Alt\\+Shift\\+F1": "host:crash!"
  }
}
