[project @ 2004-06-11 00:08:53 by jmb]

Scale view keyboard shortcuts a la !Draw

svn path=/import/netsurf/; revision=959
This commit is contained in:
John Mark Bell 2004-06-11 00:08:53 +00:00
parent a454eaa527
commit faa24817b4
1 changed files with 19 additions and 2 deletions

View File

@ -833,8 +833,8 @@ bool ro_gui_window_keypress(gui_window *g, int key, bool toolbar)
if (!toolbar) {
int c = key;
/* Munge cursor keys into unused control chars */
/* We can't map on to any of: 3,8,10,13,21,22 or 24
* That leaves 1,2,4-7,11,12,14-20,23,25-31 and 129-159
/* We can't map on to any of: 3,8,10,13,17,21,22,23 or 24
* That leaves 1,2,4-7,11,12,14-16,18-20,25-31 and 129-159
*/
if (c == 394) c = 9; /* Tab */
else if (c == 410) c = 11; /* Shift+Tab */
@ -942,6 +942,23 @@ bool ro_gui_window_keypress(gui_window *g, int key, bool toolbar)
}
return true;
case 17: /* CTRL+Q (Zoom out) */
current_gui = g;
if (current_gui->scale > 0.1) {
current_gui->scale -= 0.1;
current_gui->data.browser.reformat_pending = true;
gui_reformat_pending = true;
}
return true;
case 23: /* CTRL+W (Zoom in) */
current_gui = g;
if (current_gui->scale < 5) {
current_gui->scale += 0.1;
current_gui->data.browser.reformat_pending = true;
gui_reformat_pending = true;
}
return true;
case wimp_KEY_UP:
case wimp_KEY_DOWN:
case wimp_KEY_PAGE_UP: