diff --git a/ChangeLog b/ChangeLog index 5fa04219..12813a42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ date: * version 0.4 * added :edit, :e and :tabedit aliases for :open, :tabopen * settings can now be changed with += and -= like in vim (patch from Виктор Кожухаров) + * Support for space/shift-space/alt-left/alt-right keys without beeping * :open without argument reloads current page, :tabopen opens an empty tab * added 'n' and 'N' to repeat a search diff --git a/TODO b/TODO index a0eb2460..dd576792 100644 --- a/TODO +++ b/TODO @@ -21,7 +21,6 @@ FEATURES: 8 middleclick in content == p, and if command line is open, paste there the clipboard buffer 8 [ctrl-o/i] to Go back to a Previous Position (done partly, however currenty does not use a per tab jumplist) 8 Use our own find-as-you-type mechanism (like conkeror does) -8 A way to temporaily disable vimperator keys (for sites like gmail) 7 make hints smarter, not only with characters from from hintchars, but use "NE" or "NP" for 'new posts' e.g. (might be too slow) 7 whereever possible: get rid of dialogs and ask console-like dialog questions or write error prompts directly on the webpage or with :echo() 7 :hardcopy -> printing @@ -36,7 +35,7 @@ FEATURES: 6 pipe selected text/link/website to an external command 6 macros (qq) 6 :ls - show buffers -6 support firefox search engines +6 support firefox search engines, or at least make our search enginges user configurable 6 gf = view source? 6 make a real one-tab-mode, divert _all_ other targets, possible by setting a firefox option (set popup=0-3) 6 Shift-Insert in textboxes pastes clipboard contents diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js index ea9b124a..2ebed708 100644 --- a/chrome/content/vimperator/commands.js +++ b/chrome/content/vimperator/commands.js @@ -545,13 +545,13 @@ var g_mappings = [/*{{{*/ function(count) { scrollBufferRelative(1, 0); } ], [ - ["", ""], + ["", "", ""], "Scroll up a page", "Scroll up a full page of the current document. No count support for now.", function(count) { goDoCommand('cmd_scrollPageUp'); } ], [ - ["", ""], + ["", "", ""], "Scroll down a page", "Scroll down a full page of the current document. No count support for now.", function(count) { goDoCommand('cmd_scrollPageDown'); } @@ -571,13 +571,13 @@ var g_mappings = [/*{{{*/ function(count) { stepInHistory(count > 0 ? count : 1); } ], [ - ["H"], + ["H", "", ""], "Go back in the browser history", "Count is supported, 3H goes back 3 steps.", function(count) { stepInHistory(count > 0 ? -1 * count : -1); } ], [ - ["L"], + ["L", "", ""], "Go forward in the browser history", "Count is supported, 3L goes forward 3 steps.", function(count) { stepInHistory(count > 0 ? count : 1); } @@ -1489,6 +1489,7 @@ table.settings th {\ '
' + '' + '' + + '' + '' + '
' + @@ -1553,17 +1554,19 @@ table.settings th {\ return ret; } - var mappings = '

Mappings

' + var mappings = '

Mappings

'+ + '

The denotion of modifier keys is like in Vim, so C- means the Control key, M- the Meta key, A- the Alt key and S- the Shift key.

'+ + '

' mappings += makeHelpString(g_mappings, "#102663", "", "", null); - mappings += '
'; + mappings += '

'; - var commands = '

Commands

' + var commands = '

Commands

' commands += makeHelpString(g_commands, "#632610", ":", "", null); - commands += '
'; + commands += '

'; - var settings = '

Settings

' + var settings = '

Settings

' settings += makeHelpString(g_settings, "#106326", "'", "'", makeSettingsHelpString); - settings += '
'; + settings += '

'; var fulldoc = 'Vimperator help' + style + diff --git a/chrome/content/vimperator/hints.js b/chrome/content/vimperator/hints.js index afcf8fd3..ed778856 100644 --- a/chrome/content/vimperator/hints.js +++ b/chrome/content/vimperator/hints.js @@ -476,11 +476,11 @@ function hit_a_hint() var evt = doc.createEvent('MouseEvents'); - evt.initMouseEvent('mousedown', true, true, view, 1, x+1, y+1, 0, 0, /*ctrl*/ new_tab, /*event.altKey*/0, /*event.shiftKey*/ new_window, /*event.metaKey*/0, 0, null); + evt.initMouseEvent('mousedown', true, true, view, 1, x+1, y+1, 0, 0, /*ctrl*/ new_tab, /*event.altKey*/0, /*event.shiftKey*/ new_window, /*event.metaKey*/ new_tab, 0, null); elem.dispatchEvent(evt); var evt = doc.createEvent('MouseEvents'); - evt.initMouseEvent('click', true, true, view, 1, x+1, y+1, 0, 0, /*ctrl*/ new_tab, /*event.altKey*/0, /*event.shiftKey*/ new_window, /*event.metaKey*/0, 0, null); + evt.initMouseEvent('click', true, true, view, 1, x+1, y+1, 0, 0, /*ctrl*/ new_tab, /*event.altKey*/0, /*event.shiftKey*/ new_window, /*event.metaKey*/ new_tab, 0, null); elem.dispatchEvent(evt); diff --git a/chrome/content/vimperator/vimperator.js b/chrome/content/vimperator/vimperator.js index e72b7788..f721743c 100644 --- a/chrome/content/vimperator/vimperator.js +++ b/chrome/content/vimperator/vimperator.js @@ -942,10 +942,18 @@ function keyToString(event) return null; } + // special handling of the Space key + if (event.charCode == 32) + { + if (event.shiftKey) + modifier += "S-"; + key = "Space"; + } + // a normal key like a, b, c, 0, etc. if (event.charCode > 0) { - if (modifier.length > 0) + if (modifier.length > 0 || event.charCode == 32) return "<" + modifier + key + ">"; else return key;