File: ldml_test_utils.cpp

package info (click to toggle)
keyman 18.0.246-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,316 kB
  • sloc: python: 52,784; cpp: 21,289; sh: 7,633; ansic: 4,823; xml: 3,617; perl: 959; makefile: 139; javascript: 138
file content (27 lines) | stat: -rw-r--r-- 572 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
  Copyright:    © 2022-2023 SIL International.
  Description:  Internal utils for ldml tests
  Create Date:  16 Mar 2023
  Authors:      Steven R. Loomis (SRL)
  History:      Refactored out of ldml_test_source.cpp
*/

#include <kmx/kmx_processevent.h> // for char to vk mapping tables

#include "ldml_test_utils.hpp"

namespace km {
namespace tests {

km_core_virtual_key
get_vk(std::string const &vk) {
  for (int i = 1; i < 256; i++) {
    if (vk == km::core::kmx::s_key_names[i]) {
      return i;
    }
  }
  return 0;
}

}  // namespace tests
}  // namespace km