+      };
+
+      $(obj.toggle).on('click', toggler);
+
+      var data = $(this.topAction).data('action') || {};
+      if (!data.call && !data.submit)
+        $(this.topAction).on('click', toggler);
+    }
+  };
+
+  k.Accesskeys = {
+    known_keys: {
+     'enter': 13,
+     'esc': 27,
+    },
+    actions: {},
+    bound_targets: {},
+
+    add_accesskey: function (target, keystring, action) {
+      if (target === undefined) {
+        target = 'document';
+      }
+
+      var normalized = $.map(String.prototype.split.call(keystring, '+'), function(val, i) {
+        switch (val) {
+          case 'ctrl':
+          case 'alt':  return val;
+          case 'enter': return 13;
+          default:
+            if (val.length == 1) {
+              return val.charChodeAt(0);
+            } else if (val % 1 === 0) {
+              return val;
+            } else {
+              console.log('can not normalize access key token: ' + val);
+            }
+        }
+      }).join('+');
+
+      if (!(target in this.actions))
+        this.actions[target] = {};
+      this.actions[target][normalized] = action;
+    },
+
+    bind_targets: function(){
+      for (var target in this.actions) {
+        if (target in this.bound_targets) continue;
+        $(target).on('keypress', null, { 'target': target }, this.handle_accesskey);
+        this.bound_targets[target] = 1;
+      }
+    },
+
+    handle_accesskey: function(e,t) {
+      var target = e.data.target;
+      var key = e.which;
+      var accesskey = '';
+      if (e.ctrlKey) accesskey += 'crtl+'
+      if (e.altKey)  accesskey += 'alt+'
+      accesskey += e.which;
+
+      // special case. HTML elements that make legitimate use of enter will also trigger the enter accesskey.
+      // so. if accesskey is '13' and the event source is one of these (currently only textareas & combo boxes) ignore it.
+      // higher level widgets will usually prevent their key events from bubbling if used.
+      if (   (accesskey == 13)
+          && (   (e.target.tagName == 'TEXTAREA')
+              || (e.target.tagName == 'SELECT')))
+        return true;
+
+      if ((target in kivi.ActionBar.Accesskeys.actions) && (accesskey in kivi.ActionBar.Accesskeys.actions[target])) {
+        e.stopPropagation();
+        kivi.ActionBar.Accesskeys.actions[target][accesskey].click();
+
+        // and another special case.
+        // if the form contains submit buttons the default action will click them instead.
+        // prevent that
+        if (accesskey == 13) return false;
+      }
+      return true;