hterm: Don't trap media keys by default.

Intrudces a new preference to trap media keys and convert them to the
Chrome OS keyboard equivalent (e.g. Back is F1). By default this is
turned off, so that media keys perform their media function on Chrome
OS.

BUG=chromium:226752
TEST=Manually tested that w/ the pref on, media keys have the same
behavior, and w/ the pref off (default), media keys have media
behavior. Saw the same hex output for the media keys:
F1: 0x1b 4f 50
F2: 0x1b 4f 51
F3: 0x1b 4f 52
F4: 0x1b 4f 53
F5: 0x1b 5b 31 35 7e
F6: 0x1b 5b 31 37 7e
F7: 0x1b 5b 31 38 7e
F8: 0x1b 5b 31 39 7e
F9: 0x1b 5b 32 30 7e
F10: 0x1b 5b 32 31 7e

Change-Id: I72b49fe7a66547750243fd0e31adf953b1293125
Reviewed-on: https://gerrit.chromium.org/gerrit/47358
Reviewed-by: Robert Ginda <rginda@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
5 files changed
tree: b9918500c858ca1bdbefb654731dbcbcc9bff60c
  1. crosh_builtin/
  2. hterm/
  3. libdot/
  4. nassh/