Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[EFL] back/forward keyboard shortcuts are non-intuitive
https://bugs.webkit.org/show_bug.cgi?id=118193

Patch by Balazs Kelemen <b.kelemen@samsung.com> on 2013-06-28
Reviewed by Christophe Dumez.

Changed shortcuts for go-back/go-forward to alt+left and alt+right.

* EWebLauncher/main.c:
(on_key_down):
* MiniBrowser/efl/main.c:
(on_key_down):

Canonical link: https://commits.webkit.org/136233@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@152179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Balazs Kelemen authored and webkit-commit-queue committed Jun 28, 2013
1 parent fc68d15 commit 656250a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
14 changes: 14 additions & 0 deletions Tools/ChangeLog
@@ -1,3 +1,17 @@
2013-06-28 Balazs Kelemen <b.kelemen@samsung.com>

[EFL] back/forward keyboard shortcuts are non-intuitive
https://bugs.webkit.org/show_bug.cgi?id=118193

Reviewed by Christophe Dumez.

Changed shortcuts for go-back/go-forward to alt+left and alt+right.

* EWebLauncher/main.c:
(on_key_down):
* MiniBrowser/efl/main.c:
(on_key_down):

2013-06-28 Roger Fong <roger_fong@apple.com>

Enable AVFoundation in Web Prefs for WinLauncher and DumpRenderTree on Windows.
Expand Down
12 changes: 7 additions & 5 deletions Tools/EWebLauncher/main.c
Expand Up @@ -494,12 +494,14 @@ on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
NULL
};
static int currentEncoding = -1;
Eina_Bool ctrlPressed = evas_key_modifier_is_set(evas_key_modifier_get(e), "Control");
const Evas_Modifier *mod = evas_key_modifier_get(e);
Eina_Bool ctrlPressed = evas_key_modifier_is_set(mod, "Control");
Eina_Bool altPressed = evas_key_modifier_is_set(mod, "Alt");

if (!strcmp(ev->key, "Escape")) {
closeWindow(app->ee);
} else if (!strcmp(ev->key, "F1")) {
info("Back (F1) was pressed");
} else if (!strcmp(ev->key, "Left") && altPressed) {
info("Back (Alt+Left) was pressed");
if (ewk_view_back_possible(obj)) {
Ewk_History *history = ewk_view_history_get(obj);
Eina_List *list = ewk_history_back_list_get(history);
Expand All @@ -508,8 +510,8 @@ on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
ewk_view_back(obj);
} else
info("Back ignored: No back history");
} else if (!strcmp(ev->key, "F2")) {
info("Forward (F2) was pressed");
} else if (!strcmp(ev->key, "Right") && altPressed) {
info("Forward (Alt+Right) was pressed");
if (ewk_view_forward_possible(obj)) {
Ewk_History *history = ewk_view_history_get(obj);
Eina_List *list = ewk_history_forward_list_get(history);
Expand Down
12 changes: 7 additions & 5 deletions Tools/MiniBrowser/efl/main.c
Expand Up @@ -391,14 +391,16 @@ on_key_down(void *user_data, Evas *e, Evas_Object *ewk_view, void *event_info)
NULL
};
static int currentEncoding = -1;
Eina_Bool ctrlPressed = evas_key_modifier_is_set(evas_key_modifier_get(e), "Control");
const Evas_Modifier *mod = evas_key_modifier_get(e);
Eina_Bool ctrlPressed = evas_key_modifier_is_set(mod, "Control");
Eina_Bool altPressed = evas_key_modifier_is_set(mod, "Alt");

if (!strcmp(ev->key, "F1")) {
info("Back (F1) was pressed");
if (!strcmp(ev->key, "Left") && altPressed) {
info("Back (Alt+Left) was pressed");
if (!ewk_view_back(ewk_view))
info("Back ignored: No back history");
} else if (!strcmp(ev->key, "F2")) {
info("Forward (F2) was pressed");
} else if (!strcmp(ev->key, "Right") && altPressed) {
info("Forward (Alt+Right) was pressed");
if (!ewk_view_forward(ewk_view))
info("Forward ignored: No forward history");
} else if (!strcmp(ev->key, "F3")) {
Expand Down

0 comments on commit 656250a

Please sign in to comment.