diff options
author | Simon Glass <sjg@chromium.org> | 2011-06-28 16:44:08 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:39:42 -0700 |
commit | 74e4881db3e0bc6d56eb07b79d98cb4758e83f58 (patch) | |
tree | 9deab0bb724595d6d3241e3f94308fa9dcacca5b /include | |
parent | 6394181379106bf4e43236da416603ffed02d74d (diff) |
fdt: Add ctrl key support
This adds support for the Ctrl modifier. The left and right ctrl keys are
dealt with in the same way.
BUG=chromium-os:11623
TEST=boot U-Boot modified to print hex codes of input characters. Run through
ctrl-A to ctrl-Z and see that correct output results
Change-Id: Ibcaa2f401fce7f2ace457d4068a823caf74a8e9b
Reviewed-on: http://gerrit.chromium.org/gerrit/3354
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/fdt_decode.h | 2 | ||||
-rwxr-xr-x | include/tegra-kbc.h | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/include/fdt_decode.h b/include/fdt_decode.h index c4b78d73ffc..7089778e5d3 100644 --- a/include/fdt_decode.h +++ b/include/fdt_decode.h @@ -177,6 +177,7 @@ struct fdt_kbc { u8 plain_keycode[FDT_KBC_KEY_COUNT]; u8 shift_keycode[FDT_KBC_KEY_COUNT]; u8 fn_keycode[FDT_KBC_KEY_COUNT]; + u8 ctrl_keycode[FDT_KBC_KEY_COUNT]; }; /** @@ -380,6 +381,7 @@ char *fdt_decode_get_config_string(const void *blob, const char *prop_name); * keycode-plain * keycode-shift * keycode-fn + * keycode-ctrl * * @param blob FDT blob to use * @param node Node to read from diff --git a/include/tegra-kbc.h b/include/tegra-kbc.h index 9a2357a61fe..ddc6379cc36 100755 --- a/include/tegra-kbc.h +++ b/include/tegra-kbc.h @@ -9,7 +9,15 @@ #include <common.h> -enum KEYS { KEY_FN = 222, KEY_SHIFT = 223}; +enum KEYS { + KEY_FIRST_MODIFIER = 220, + KEY_RIGHT_CTRL = KEY_FIRST_MODIFIER, + KEY_LEFT_CTRL, + KEY_FN, + KEY_SHIFT, +}; + +#define KEY_IS_MODIFIER(key) ((key) >= KEY_FIRST_MODIFIER) enum { KBC_MAX_ROW = 16, @@ -22,6 +30,7 @@ struct tegra_keyboard_config { int plain_keycode[KBC_KEY_COUNT]; /* when no Shift or Fn */ int shift_keycode[KBC_KEY_COUNT]; /* Shift modifier key is pressed */ int fn_keycode[KBC_KEY_COUNT]; /* Fn modifier key is pressed */ + int ctrl_keycode[KBC_KEY_COUNT]; /* Ctrl modifier key is pressed */ }; struct kbc_tegra { |