summaryrefslogtreecommitdiffstats
path: root/src/emu/natkeyboard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/natkeyboard.cpp')
-rw-r--r--src/emu/natkeyboard.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/emu/natkeyboard.cpp b/src/emu/natkeyboard.cpp
index 9a50109eb6f..3851d98719e 100644
--- a/src/emu/natkeyboard.cpp
+++ b/src/emu/natkeyboard.cpp
@@ -565,6 +565,27 @@ void natural_keyboard::post_coded(const char *text, size_t length, const attotim
//-------------------------------------------------
+// paste - does a paste from the keyboard
+//-------------------------------------------------
+
+void natural_keyboard::paste()
+{
+ // retrieve the clipboard text
+ char *text = osd_get_clipboard_text();
+
+ // was a result returned?
+ if (text != nullptr)
+ {
+ // post the text
+ post_utf8(text);
+
+ // free the string
+ free(text);
+ }
+}
+
+
+//-------------------------------------------------
// build_codes - given an input port table, create
// an input code table useful for mapping unicode
// chars