Added shortcuts for vi-like scrolling using h/l/j/k keys

Review Request #101782 - Created June 27, 2011 and submitted

Thomas Murach
This patch adds shortcuts for scrolling as in vi or konqueror and meets bug #238761.
Things reviewers could check:
 - is it wanted to not scroll when shift (or ctrl or other modifiers) is pressed? If so, I could produce another patch for usual scrolling using arrow keys + modifiers.
 - would you propose using KActions?

Pierre Rossi
I'm a bit surprised this even works, event1 goes out of scope before even calling the parent implementation, which means your event points to some random memory (possibly the local variables for KWebView::keyPressEvent) at the top of the stack. Doesn't look right to me.

  1. uhm... it seems I was so happy to restart committing and playing that I didn't properly reviewed this. :)
    Anyway, I tested this patch for an hour or so and I can ensure it works properly.
    Let's see what we can do to clean up the code.
  2. Pierre: thanks for the fix :D
src/webview.cpp (Diff revision 1)
This should really be event = new QKeyEvent...
Also you probably want to accept the existing one before you do that, so that it doesn't get propagated.
src/webview.cpp (Diff revision 1)
else if for that one and the next ones maybe ?