YSTest: Keys.h 文件参考

YSTest PreAlpha_b700_20160611 The YSLib Test Project

- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件

- 文件列表
- 文件成员

命名空间 | 类型定义 | 枚举 | 函数
Keys.h 文件参考
YFramework Library » YCommonLib

平台相关的基本按键输入定义。 更多...

`#include "YModules.h"`
`#include <YCLib/YCommon.h>`
`#include <bitset>`
Keys.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

## 命名空间

| platform
| 默认平台命名空间。
| platform::KeyCategory
| 按键类别。
| platform::KeyCodes
| 本机按键编码。
| platform::KeyCodes::DS
| platform::KeyCodes::Win32
| platform::KeyCodes::Android
| platform::KeyCodes::Linux

## 类型定义

using | platform::KeyIndex = size_t
| 按键索引类型：标识特定的按键在按键集合中的位置。 更多...
using | platform::KeyInput = std::bitset< KeyBitsetWidth >
| 按键并行位宽。 更多...

## 枚举

enum

platform::KeyCategory::Category : std::uint_least32_t {
platform::KeyCategory::None = 0, platform::KeyCategory::Alphabetic = 1 << 1, platform::KeyCategory::Numeric = 1 << 2, platform::KeyCategory::Alphanumeric = Alphabetic | Numeric,
platform::KeyCategory::Punctuation = 1 << 3, platform::KeyCategory::Character = Alphanumeric | Punctuation, platform::KeyCategory::Dead = 1 << 4, platform::KeyCategory::Lock = 2 << 4,
platform::KeyCategory::Modifier = 1 << 6, platform::KeyCategory::Function = 1 << 7, platform::KeyCategory::Navigation = 1 << 8, platform::KeyCategory::Editing = 1 << 9,
platform::KeyCategory::System = 1 << 10, platform::KeyCategory::IME = 1 << 11, platform::KeyCategory::OEM = 1 << 12, platform::KeyCategory::Menu = 1 << 13,
platform::KeyCategory::Keypad = 1 << 14, platform::KeyCategory::NonKeyboard = 2 << 14, platform::KeyCategory::Composed = 1 << 16, platform::KeyCategory::Virtual = 2 << 16
}

| 按键类别。 更多...

enum

platform::KeyCodes::DS::NativeSet {
platform::KeyCodes::DS::A = 0, platform::KeyCodes::DS::B = 1, platform::KeyCodes::DS::Select = 2, platform::KeyCodes::DS::Start = 3,
platform::KeyCodes::DS::Right = 4, platform::KeyCodes::DS::Left = 5, platform::KeyCodes::DS::Up = 6, platform::KeyCodes::DS::Down = 7,
platform::KeyCodes::DS::R = 8, platform::KeyCodes::DS::L = 9, platform::KeyCodes::DS::X = 10, platform::KeyCodes::DS::Y = 11,
platform::KeyCodes::DS::Touch = 12, platform::KeyCodes::DS::Lid = 13
}

enum

platform::KeyCodes::DS::ExtendedSet {
platform::KeyCodes::DS::Backspace = 14, platform::KeyCodes::DS::Tab, platform::KeyCodes::DS::Shift, platform::KeyCodes::DS::Ctrl,
platform::KeyCodes::DS::Alt, platform::KeyCodes::DS::Pause, platform::KeyCodes::DS::CapsLock, platform::KeyCodes::DS::Space,
platform::KeyCodes::DS::Insert, platform::KeyCodes::DS::Delete, platform::KeyCodes::DS::Secondary, platform::KeyCodes::DS::Tertiary
}

| 扩展集：作为 DS 可直接被 KeyInput 表示的非物理键按键编码。 更多...

enum

platform::KeyCodes::Win32::NativeSet {
platform::KeyCodes::Win32::Empty = 0, platform::KeyCodes::Win32::Primary = 0x01, platform::KeyCodes::Win32::Secondary = 0x02, platform::KeyCodes::Win32::Tertiary = 0x04,
platform::KeyCodes::Win32::Backspace = 0x08, platform::KeyCodes::Win32::Tab = 0x09, platform::KeyCodes::Win32::Enter = 0x0D, platform::KeyCodes::Win32::Shift = 0x10,
platform::KeyCodes::Win32::Ctrl = 0x11, platform::KeyCodes::Win32::Alt = 0x12, platform::KeyCodes::Win32::Pause = 0x13, platform::KeyCodes::Win32::CapsLock = 0x14,
platform::KeyCodes::Win32::Esc = 0x1B, platform::KeyCodes::Win32::Space = 0x20, platform::KeyCodes::Win32::PgUp = 0x21, platform::KeyCodes::Win32::PgDn = 0x22,
platform::KeyCodes::Win32::End = 0x23, platform::KeyCodes::Win32::Home = 0x24, platform::KeyCodes::Win32::Left = 0x25, platform::KeyCodes::Win32::Up = 0x26,
platform::KeyCodes::Win32::Right = 0x27, platform::KeyCodes::Win32::Down = 0x28, platform::KeyCodes::Win32::Insert = 0x2D, platform::KeyCodes::Win32::Delete = 0x2E
}

| 基本公用按键集合。 更多...

enum

platform::KeyCodes::Android::NativeSet {
platform::KeyCodes::Android::Empty = 0, platform::KeyCodes::Android::Up = 0x13, platform::KeyCodes::Android::Down = 0x14, platform::KeyCodes::Android::Left = 0x15,
platform::KeyCodes::Android::Right = 0x16, platform::KeyCodes::Android::Alt = 0x39, platform::KeyCodes::Android::Shift = 0x3B, platform::KeyCodes::Android::Tab = 0x3D,
platform::KeyCodes::Android::Space = 0x3E, platform::KeyCodes::Android::Enter = 0x42, platform::KeyCodes::Android::Backspace = 0x43, platform::KeyCodes::Android::PgUp = 0x5C,
platform::KeyCodes::Android::PgDn = 0x5D, platform::KeyCodes::Android::Esc = 0x6F, platform::KeyCodes::Android::Delete = 0x70, platform::KeyCodes::Android::Ctrl = 0x71,
platform::KeyCodes::Android::CapsLock = 0x73, platform::KeyCodes::Android::Pause = 0x79, platform::KeyCodes::Android::Home = 0x7A, platform::KeyCodes::Android::End = 0x7B,
platform::KeyCodes::Android::Insert = 0x7C
}

| 基本公用按键集合。 更多...
enum | platform::KeyCodes::Android::ExtendedSet { platform::KeyCodes::Android::Primary = 0xE0, platform::KeyCodes::Android::Secondary = 0xE1, platform::KeyCodes::Android::Tertiary = 0xE2 }

enum

platform::KeyCodes::Linux::NativeSet {
platform::KeyCodes::Linux::Empty = 0, platform::KeyCodes::Linux::Esc = 1, platform::KeyCodes::Linux::Backspace = 14, platform::KeyCodes::Linux::Tab = 15,
platform::KeyCodes::Linux::Enter = 28, platform::KeyCodes::Linux::Ctrl = 29, platform::KeyCodes::Linux::Shift = 42, platform::KeyCodes::Linux::Alt = 56,
platform::KeyCodes::Linux::Space = 57, platform::KeyCodes::Linux::CapsLock = 58, platform::KeyCodes::Linux::Home = 102, platform::KeyCodes::Linux::Up = 103,
platform::KeyCodes::Linux::PgUp = 104, platform::KeyCodes::Linux::Left = 105, platform::KeyCodes::Linux::Right = 106, platform::KeyCodes::Linux::End = 107,
platform::KeyCodes::Linux::Down = 108, platform::KeyCodes::Linux::PgDn = 109, platform::KeyCodes::Linux::Insert = 110, platform::KeyCodes::Linux::Delete = 111,
platform::KeyCodes::Linux::Pause = 119, platform::KeyCodes::Linux::Primary = 0x110, platform::KeyCodes::Linux::Secondary = 0x111, platform::KeyCodes::Linux::Tertiary = 0x112
}

| 基本公用按键集合。 更多...

## 函数

YF_API KeyIndex | platform::FindFirstKey (const KeyInput &) ynothrow
| 找到输入缓冲区记录中最小的按键编码。 更多...
YF_API KeyIndex | platform::FindNextKey (const KeyInput &, KeyIndex) ynothrow
| 找到输入缓冲区记录中大于指定编码的最小的按键编码。 更多...
YF_API KeyIndex | platform::KeyCategory::FindFirstKeyInCategroy (const KeyInput &, KeyIndex) ynothrow
| 找到第一个在指定类别的按键编码。 更多...
yconstfn | platform::KeyCategory::PDefH (bool, IsComposedKey, KeyIndex) ynothrow ImplRet(
| 判断指定按键编码是否通过多个物理按键组合构成。 更多...
YF_API bool | platform::KeyCodes::FetchLockState (KeyIndex) ynothrow
| 取锁定键状态。 更多...
YF_API void | platform::KeyCodes::ToggleLockState (KeyIndex) ynothrow
| 切换锁定键状态。 更多...
yconstfn | platform::PDefH (char, MapKeyChar, KeyIndex) ynothrow ImplRet(
| 映射按键到键入的字符。 更多...
yconstfn | platform::PDefH (char, MapKeyChar, const KeyInput &, KeyIndex) ynothrow ImplRet(

## 变量

static yconstexpr const NativeSet | platform::KeyCodes::DS::Enter = A
| 按键别名。 更多...
static yconstexpr const NativeSet | platform::KeyCodes::DS::Esc = B
static yconstexpr const NativeSet | platform::KeyCodes::DS::PgUp = L
static yconstexpr const NativeSet | platform::KeyCodes::DS::PgDn = R
static yconstexpr const NativeSet | platform::KeyCodes::DS::Home = X
static yconstexpr const NativeSet | platform::KeyCodes::DS::End = Y
static yconstexpr const NativeSet | platform::KeyCodes::DS::Primary = Touch

## 详细描述

平台相关的基本按键输入定义。

版本
  r1135

作者
  FrankHB frank.nosp@m.hb19.nosp@m.89@gm.nosp@m.ail..nosp@m.com

自从
  build 313

创建时间:
  2012-06-01 14:29:56 +0800

修改时间:
  2015-11-27 14:08 +0800

文本编码:
  UTF-8

模块名称:
  YCLib::Keys

在文件 Keys.h 中定义.