[gtk-vnc] gvncviewer.py add menu items for sending Ctrl+Alt+F2 and Ctrl+Alt+F3
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] gvncviewer.py add menu items for sending Ctrl+Alt+F2 and Ctrl+Alt+F3
- Date: Tue, 8 Dec 2020 14:30:14 +0000 (UTC)
commit 894ee587727aacda86f36ec524b0be7b95091499
Author: Dr. Matthias St. Pierre <matthias st pierre ncp-e com>
Date: Thu Oct 22 22:16:30 2020 +0200
gvncviewer.py add menu items for sending Ctrl+Alt+F2 and Ctrl+Alt+F3
You can never have enough console windows ;-)
examples/gvncviewer.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
---
diff --git a/examples/gvncviewer.py b/examples/gvncviewer.py
index 5b9be76..dbe69d4 100755
--- a/examples/gvncviewer.py
+++ b/examples/gvncviewer.py
@@ -98,6 +98,14 @@ def send_caf1(src, vnc):
print("Send Ctrl+Alt+F1")
vnc.send_keys([Gdk.KEY_Control_L, Gdk.KEY_Alt_L, Gdk.KEY_F1])
+def send_caf2(src, vnc):
+ print("Send Ctrl+Alt+F2")
+ vnc.send_keys([Gdk.KEY_Control_L, Gdk.KEY_Alt_L, Gdk.KEY_F2])
+
+def send_caf3(src, vnc):
+ print("Send Ctrl+Alt+F3")
+ vnc.send_keys([Gdk.KEY_Control_L, Gdk.KEY_Alt_L, Gdk.KEY_F3])
+
def send_caf7(src, vnc):
print("Send Ctrl+Alt+F7")
vnc.send_keys([Gdk.KEY_Control_L, Gdk.KEY_Alt_L, Gdk.KEY_F7])
@@ -184,18 +192,24 @@ menubar.append(sendkeys)
buttons = Gtk.HBox()
caf1 = Gtk.MenuItem.new_with_mnemonic("Ctrl+Alt+F_1")
+caf2 = Gtk.MenuItem.new_with_mnemonic("Ctrl+Alt+F_2")
+caf3 = Gtk.MenuItem.new_with_mnemonic("Ctrl+Alt+F_3")
caf7 = Gtk.MenuItem.new_with_mnemonic("Ctrl+Alt+F_7")
cad = Gtk.MenuItem.new_with_mnemonic("Ctrl+Alt+_Del")
cab = Gtk.MenuItem.new_with_mnemonic("Ctrl+Alt+_Backspace")
submenu = Gtk.Menu()
submenu.append(caf1)
+submenu.append(caf2)
+submenu.append(caf3)
submenu.append(caf7)
submenu.append(cad)
submenu.append(cab)
sendkeys.set_submenu(submenu)
caf1.connect("activate", send_caf1, vnc)
+caf2.connect("activate", send_caf2, vnc)
+caf3.connect("activate", send_caf3, vnc)
caf7.connect("activate", send_caf7, vnc)
cad.connect("activate", send_cad, vnc)
cab.connect("activate", send_cab, vnc)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]