MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / GetLayoutName

Method GetLayoutName

cpp/imehandler/windows/src/winapihandler.cc:48–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48std::string WinapiHandler::GetLayoutName(std::string hkl) const {
49 std::string name = "";
50 std::vector<keyboard_layout>::const_iterator it = keyboard_layouts.begin();
51 // First we look for existing entries without change.
52 while (it != keyboard_layouts.end() && (it->first != hkl)) { it++; }
53 if (it != keyboard_layouts.end()) {
54 name = it->second;
55 } else {
56 // If we didn't find it, then look if the name must be changed.
57 // For instance 04090409 is loaded as 00000409 (US).
58 if (hkl.find("0000") != 0) {
59 hkl = "0000"+hkl.substr(4);
60 it = keyboard_layouts.begin();
61 while (it != keyboard_layouts.end() && (it->first != hkl)) { it++; }
62 if (it != keyboard_layouts.end()) {
63 name = it->second;
64 }
65 }
66 }
67 return name;
68}
69
70std::string WinapiHandler::GetLayoutHkl(const std::string& name) const {
71 std::string hkl = "";

Callers

nothing calls this directly

Calls 2

endMethod · 0.80
findMethod · 0.80

Tested by

no test coverage detected