Sunshine latest
Self-hosted game stream host for Moonlight.
inputtino_keyboard.cpp File Reference

Definitions for inputtino keyboard input handling. More...

#include <boost/locale.hpp>
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>
#include "inputtino_common.h"
#include "inputtino_keyboard.h"
#include "src/config.h"
#include "src/logging.h"
#include "src/platform/common.h"
#include "src/utility.h"
Include dependency graph for inputtino_keyboard.cpp:

Functions

std::string platf::keyboard::to_hex (const std::basic_string< char32_t > &str)
 
void platf::keyboard::unicode (input_raw_t *raw, char *utf8, int size)
 
void platf::keyboard::update (input_raw_t *raw, uint16_t modcode, bool release, uint8_t flags)
 

Detailed Description

Definitions for inputtino keyboard input handling.

Function Documentation

◆ to_hex()

std::string platf::keyboard::to_hex ( const std::basic_string< char32_t > & str)

Takes an UTF-32 encoded string and returns a hex string representation of the bytes (uppercase)

ex: ['👱'] = "1F471" // see UTF encoding at https://www.compart.com/en/unicode/U+1F471

adapted from: https://stackoverflow.com/a/7639754