| 1274 | } |
| 1275 | |
| 1276 | void RenderViewImpl::onGLFWCharCallback(GLFWwindow* /*window*/, unsigned int charCode) |
| 1277 | { |
| 1278 | std::string utf8String; |
| 1279 | StringUtils::UTF32ToUTF8(std::u32string_view{(char32_t*)&charCode, (size_t)1}, utf8String); |
| 1280 | static std::unordered_set<std::string_view> controlUnicode = { |
| 1281 | "\xEF\x9C\x80", // up |
| 1282 | "\xEF\x9C\x81", // down |
| 1283 | "\xEF\x9C\x82", // left |
| 1284 | "\xEF\x9C\x83", // right |
| 1285 | "\xEF\x9C\xA8", // delete |
| 1286 | "\xEF\x9C\xA9", // home |
| 1287 | "\xEF\x9C\xAB", // end |
| 1288 | "\xEF\x9C\xAC", // pageup |
| 1289 | "\xEF\x9C\xAD", // pagedown |
| 1290 | "\xEF\x9C\xB9" // clear |
| 1291 | }; |
| 1292 | // Check for send control key |
| 1293 | if (controlUnicode.find(utf8String) == controlUnicode.end()) |
| 1294 | { |
| 1295 | IMEDispatcher::sharedDispatcher()->dispatchInsertText(utf8String.c_str(), utf8String.size()); |
| 1296 | } |
| 1297 | } |
| 1298 | |
| 1299 | void RenderViewImpl::onGLFWWindowPosCallback(GLFWwindow* /*window*/, int x, int y) |
| 1300 | { |
no test coverage detected