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