summaryrefslogtreecommitdiffstats
path: root/remoting/client/input_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/client/input_handler.cc')
-rw-r--r--remoting/client/input_handler.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/remoting/client/input_handler.cc b/remoting/client/input_handler.cc
index dd0fd7a..7f6f7ab 100644
--- a/remoting/client/input_handler.cc
+++ b/remoting/client/input_handler.cc
@@ -20,6 +20,16 @@ InputHandler::InputHandler(ClientContext* context,
mouse_y_(0) {
}
+void InputHandler::SendKeyEvent(bool press, int keycode) {
+ ChromotingClientMessage msg;
+
+ KeyEvent *event = msg.mutable_key_event();
+ event->set_key(keycode);
+ event->set_pressed(press);
+
+ connection_->SendEvent(msg);
+}
+
void InputHandler::SendMouseMoveEvent(int x, int y) {
ChromotingClientMessage msg;