You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by jm...@apache.org on 2016/08/17 03:19:46 UTC

[2/4] incubator-guacamole-server git commit: GUACAMOLE-51: Support -num and +num option (require clear/set numlock) in keymaps.

GUACAMOLE-51: Support -num and +num option (require clear/set numlock) in keymaps.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/69ab0543
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/69ab0543
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/69ab0543

Branch: refs/heads/master
Commit: 69ab05432334f98b755bd90ea96570573fde8773
Parents: 0c48096
Author: Michael Jumper <mj...@apache.org>
Authored: Sun Aug 14 18:46:29 2016 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Tue Aug 16 20:00:24 2016 -0700

----------------------------------------------------------------------
 src/protocols/rdp/keymaps/generate.pl | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/69ab0543/src/protocols/rdp/keymaps/generate.pl
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/keymaps/generate.pl b/src/protocols/rdp/keymaps/generate.pl
index 255e7b1..d3764d6 100755
--- a/src/protocols/rdp/keymaps/generate.pl
+++ b/src/protocols/rdp/keymaps/generate.pl
@@ -97,9 +97,11 @@ for my $filename (@ARGV) {
             my $ext_flags = 0;
             my $set_shift = 0;
             my $set_altgr = 0;
+            my $set_num   = 0;
 
             my $clear_shift = 0;
             my $clear_altgr = 0;
+            my $clear_num   = 0;
 
             # Parse ranges and options
             foreach $_ (split(/\s+/, $range)) {
@@ -108,6 +110,7 @@ for my $filename (@ARGV) {
                 if ((my $opt) = m/^\+([a-z]+)$/) {
                     if    ($opt eq "shift") { $set_shift = 1; }
                     elsif ($opt eq "altgr") { $set_altgr = 1; }
+                    elsif ($opt eq "num")   { $set_num   = 1; }
                     elsif ($opt eq "ext")   { $ext_flags = 1; }
                     else {
                         die "$filename: $.: ERROR: "
@@ -119,6 +122,7 @@ for my $filename (@ARGV) {
                 elsif ((my $opt) = m/^-([a-z]+)$/) {
                     if    ($opt eq "shift") { $clear_shift = 1; }
                     elsif ($opt eq "altgr") { $clear_altgr = 1; }
+                    elsif ($opt eq "num")   { $clear_num   = 1; }
                     else {
                         die "$filename: $.: ERROR: "
                           . "Invalid clear option\n";
@@ -198,6 +202,16 @@ for my $filename (@ARGV) {
                     $content .= ", .clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT_ALTGR";
                 }
 
+                # Set locks
+                if ($set_num) {
+                    $content .= ", .set_locks = KBD_SYNC_NUM_LOCK";
+                }
+
+                # Clear locks
+                if ($clear_num) {
+                    $content .= ", .clear_locks = KBD_SYNC_NUM_LOCK";
+                }
+
                 # Flags
                 if ($ext_flags) {
                     $content .= ", .flags = KBD_FLAGS_EXTENDED";