diff options
author | 2019-07-20 14:49:15 -0400 | |
---|---|---|
committer | 2019-07-20 13:49:15 -0500 | |
commit | 4c2c3e52ee3a125a50908a4991fabf4adf114493 (patch) | |
tree | 18e2c3c51635ee6aac17ae6b2bdd4e2108a58539 /src/emu/natkeyboard.cpp | |
parent | 8893bfcd7ee8dc59d13a872f4107ae09df2d384b (diff) |
Exposed natual_keyboard object to LUA (#5364)
Diffstat (limited to 'src/emu/natkeyboard.cpp')
-rw-r--r-- | src/emu/natkeyboard.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/emu/natkeyboard.cpp b/src/emu/natkeyboard.cpp index 3851d98719e..17782815d22 100644 --- a/src/emu/natkeyboard.cpp +++ b/src/emu/natkeyboard.cpp @@ -486,6 +486,13 @@ void natural_keyboard::post_utf8(const char *text, size_t length, const attotime } +void natural_keyboard::post_utf8(const std::string &text, const attotime &rate) +{ + if (!text.empty()) + post_utf8(text.c_str(), text.size(), rate); +} + + //------------------------------------------------- // post_coded - post a coded string //------------------------------------------------- @@ -564,6 +571,13 @@ void natural_keyboard::post_coded(const char *text, size_t length, const attotim } +void natural_keyboard::post_coded(const std::string &text, const attotime &rate) +{ + if (!text.empty()) + post_coded(text.c_str(), text.size(), rate); +} + + //------------------------------------------------- // paste - does a paste from the keyboard //------------------------------------------------- |