]> source.dussan.org Git - nextcloud-server.git/commitdiff
Enter
authorErik Sargent <esthepiking@gmail.com>
Thu, 29 Nov 2012 02:58:42 +0000 (19:58 -0700)
committerErik Sargent <esthepiking@gmail.com>
Thu, 29 Nov 2012 02:58:42 +0000 (19:58 -0700)
apps/files/js/keyboardshortcuts.js

index 8a99bb52691104a3f82992e2ad5066e4714d3fb5..95e1ce428c964b133957ec8c3b488290348a17c7 100644 (file)
@@ -24,7 +24,8 @@ Files.bindKeyboardShortcuts = function (document, $) {
                ctrl: 16,
                esc: 27,
                downArrow: 40,
-               upArrow: 38
+               upArrow: 38,
+               enter: 13
        };
 
        $(document).keydown(function(event){//check for modifier keys
@@ -108,6 +109,15 @@ Files.bindKeyboardShortcuts = function (document, $) {
                        }
                }
                
+               if($.inArray(keyCodes.enter, keys) !== -1){
+                       $("#fileList tr").each(function(index){
+                               if($(this).hasClass("mouseOver")){
+                               $(this).removeClass("mouseOver");
+                               $(this).find("span:first").trigger('click');
+                       }
+                       });
+               }
+               
                removeA(keys, event.keyCode);
        });
 };
\ No newline at end of file