diff --git a/source/Ox.UI/js/List/Ox.List.js b/source/Ox.UI/js/List/Ox.List.js index 31ec0806..8d8d3e90 100644 --- a/source/Ox.UI/js/List/Ox.List.js +++ b/source/Ox.UI/js/List/Ox.List.js @@ -43,6 +43,7 @@ Ox.List List Element select select item @*/ +// fixme: rename the add event to new, or the delete event to remove Ox.List = function(options, self) { @@ -105,7 +106,18 @@ Ox.List = function(options, self) { itemMargin: self.options.type == 'text' ? 0 : 8, // 2 x 4 px margin ... fixme: the 2x should be computed later keyboardEvents: { key_control_c: copyItems, - key_control_n: addItem, + key_control_n: function() { + addItem(''); + }, + key_alt_control_n: function() { + addItem('alt'); + }, + key_alt_shift_control_n: function() { + addItem('alt_shift'); + }, + key_shift_control_n: function() { + addItem('shift'); + }, key_control_v: pasteItems, key_control_x: cutItems, key_delete: deleteItems, @@ -240,8 +252,10 @@ Ox.List = function(options, self) { } } - function addItem() { - that.triggerEvent('add', {}); + function addItem(keys) { + that.triggerEvent('add', { + keys: keys + }); } function addNextToSelection() {