GUI -- Fixed topo toolbar button synchronization with keystroke commands.
- Added toggleNoCb to the toggle button widget.
- Added _keyListener property to keyBindings structure, and the invocation of it from keyIn().
- Added keyListener to topoToolbar to synchronize button state.

Change-Id: Iffb1dc5d38f2d9010f5e246cfb81a6b3db30d4af
diff --git a/web/gui/src/main/webapp/app/fw/util/keys.js b/web/gui/src/main/webapp/app/fw/util/keys.js
index d22a335..d157414 100644
--- a/web/gui/src/main/webapp/app/fw/util/keys.js
+++ b/web/gui/src/main/webapp/app/fw/util/keys.js
@@ -76,6 +76,7 @@
             gk = kh.globalKeys[key],
             gcb = fs.isF(gk) || (fs.isA(gk) && fs.isF(gk[0])),
             vk = kh.viewKeys[key],
+            kl = fs.isF(kh.viewKeys._keyListener),
             vcb = fs.isF(vk) || (fs.isA(vk) && fs.isF(vk[0])) || fs.isF(kh.viewFn),
             token = getViewToken();
 
@@ -91,6 +92,9 @@
             if (vcb) {
                 vcb(token, key, keyCode, event);
             }
+            if (kl) {
+                kl(key);
+            }
         }
     }
 
diff --git a/web/gui/src/main/webapp/app/fw/widget/button.js b/web/gui/src/main/webapp/app/fw/widget/button.js
index 6b4ca28..c9980ee 100644
--- a/web/gui/src/main/webapp/app/fw/widget/button.js
+++ b/web/gui/src/main/webapp/app/fw/widget/button.js
@@ -92,10 +92,15 @@
         is.loadIcon(togDiv, gid, btnSize, true);
         togDiv.classed('selected', sel);
 
-        function _toggle(b) {
+        function _toggle(b, nocb) {
             sel = (b === undefined) ? !sel : !!b;
             togDiv.classed('selected', sel);
-            cbFnc(sel);
+            nocb || cbFnc(sel);
+        }
+
+        // toggle the button state without invoking the callback
+        function toggleNoCb() {
+            _toggle(undefined, true);
         }
 
         togDiv.on('click', _toggle);
@@ -104,7 +109,8 @@
             id: id,
             width: buttonWidth,
             selected: function () { return sel; },
-            toggle: _toggle
+            toggle: _toggle,
+            toggleNoCb: toggleNoCb
         }
     }