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 <stdlib.h>
9
10#include <hid/hid.h>
11
12// Converts the given HID keycode into an equivalent VT100/ANSI byte
13// sequence, for the given modifier key state and keymap.  This writes the
14// result into |buf| and returns the number of bytes that were written.
15uint32_t hid_key_to_vt100_code(uint8_t keycode, int modifiers,
16                               keychar_t* keymap, char* buf, size_t buf_size);
17