| // Copyright 2017 The Fuchsia Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| #pragma once | |
| #include <stdint.h> | |
| #include <zircon/types.h> | |
| #include "vc.h" | |
| #define MOD_LSHIFT (1 << 0) | |
| #define MOD_RSHIFT (1 << 1) | |
| #define MOD_LALT (1 << 2) | |
| #define MOD_RALT (1 << 3) | |
| #define MOD_LCTRL (1 << 4) | |
| #define MOD_RCTRL (1 << 5) | |
| #define MOD_CAPSLOCK (1 << 6) | |
| #define MOD_SHIFT (MOD_LSHIFT | MOD_RSHIFT) | |
| #define MOD_ALT (MOD_LALT | MOD_RALT) | |
| #define MOD_CTRL (MOD_LCTRL | MOD_RCTRL) | |
| typedef struct vc_input vc_input_t; | |
| zx_status_t vc_input_create(vc_input_t** out, keypress_handler_t handler, int fd); | |
| bool vc_input_process(vc_input_t* vi, uint8_t report[8]); |