commit 103041bb11141d69f2903399c3efd0c7512bb8f8
parent ac3a9a4a6a12086e4b8c51cb3312d9e92b0457a2
Author: Kyle Milz <kmilz@ucalgary.ca>
Date: Wed, 17 Oct 2012 15:03:22 -0600
move commands[] array over to keymap.h
Diffstat:
3 files changed, 59 insertions(+), 62 deletions(-)
diff --git a/src/commands.c b/src/commands.c
@@ -9,6 +9,7 @@
#include "utilities.h"
#include "window.h"
#include "buffer.h"
+#include "keymap.h"
// static unsigned int scrollstep = 40; /* cursor difference in pixel */
// static unsigned int pagingkeep = 40; /* pixels kept when paging */
diff --git a/src/commands.h b/src/commands.h
@@ -30,65 +30,3 @@ Eina_Bool inspector(const Arg *, void *);
Eina_Bool window(const Arg *arg, void *data);
// static Eina_Bool fake_key_event(const Arg *, void *);
-
-/* command mapping */
-static Command commands[] = {
- /* command, function, argument */
- { "b", switch_buffer, {0} },
- { "ba", navigate, {NavigationBack} },
- { "back", navigate, {NavigationBack} },
- { "ec", script, {Info} },
- { "echo", script, {Info} },
- { "echoe", script, {Error} },
- { "echoerr", script, {Error} },
- { "fw", navigate, {NavigationForward} },
- { "fo", navigate, {NavigationForward} },
- { "forward", navigate, {NavigationForward} },
- { "javascript", script, {Silent} },
- { "o", open_arg, {TargetCurrent} },
- { "open", open_arg, {TargetCurrent} },
- { "q", quit, {0} },
- { "quit", quit, {0} },
- { "re", navigate, {NavigationReload} },
- { "re!", navigate, {NavigationForceReload} },
- { "reload", navigate, {NavigationReload} },
- { "reload!", navigate, {NavigationForceReload} },
- { "qt", search_tag, {0} },
- { "st", navigate, {NavigationCancel} },
- { "stop", navigate, {NavigationCancel} },
- { "t", open_arg, {0} },
- { "tabopen", open_arg, {TargetNew} },
- { "print", print_frame, {0} },
- { "bma", bookmark, {0} },
- { "bookmark", bookmark, {0} },
- { "source", view_source, {0} },
- // { "set", browser_settings, {0} },
- // { "map", mappings, {0} },
- { "jumpleft", scroll, {ScrollJumpTo | DirectionLeft} },
- { "jumpright", scroll, {ScrollJumpTo | DirectionRight} },
- { "jumptop", scroll, {ScrollJumpTo | DirectionTop} },
- { "jumpbottom", scroll, {ScrollJumpTo | DirectionBottom} },
- { "pageup", scroll, {ScrollMove | DirectionTop | UnitPage} },
- { "pagedown", scroll, {ScrollMove | DirectionBottom | UnitPage} },
- { "navigationback", navigate, {NavigationBack} },
- { "navigationforward", navigate, {NavigationForward} },
- { "scrollleft", scroll, {ScrollMove | DirectionLeft | UnitLine} },
- { "scrollright", scroll, {ScrollMove | DirectionRight | UnitLine} },
- { "scrollup", scroll, {ScrollMove | DirectionTop | UnitLine} },
- { "scrolldown", scroll, {ScrollMove | DirectionBottom | UnitLine} },
- { "ls", list, {0} },
- { "winopen", window, {CreateWindow} },
- { "winclose", window, {DeleteWindow} },
-};
-
-
-/* mouse bindings
- you can use MOUSE_BUTTON_1 to MOUSE_BUTTON_5
-*/
-//static Mouse mouse[] = {
- /* modmask, modkey, button, function, argument */
-// {0, 0, 2, paste, {TargetCurrent | ClipboardPrimary | ClipboardGTK, rememberedURI} },
-// {"Control", 0, 2, paste, {TargetNew | ClipboardPrimary | ClipboardGTK} },
-// {"Control", 0, 1, open_remembered, {TargetNew} },
-//};
-
diff --git a/src/keymap.h b/src/keymap.h
@@ -136,5 +136,63 @@ static Key keys[] = {
{ 0, 0, 0, 0, {0} },
};
+/* command mapping */
+static Command commands[] = {
+ /* command, function, argument */
+ { "b", switch_buffer, {0} },
+ { "ba", navigate, {NavigationBack} },
+ { "back", navigate, {NavigationBack} },
+ { "ec", script, {Info} },
+ { "echo", script, {Info} },
+ { "echoe", script, {Error} },
+ { "echoerr", script, {Error} },
+ { "fw", navigate, {NavigationForward} },
+ { "fo", navigate, {NavigationForward} },
+ { "forward", navigate, {NavigationForward} },
+ { "javascript", script, {Silent} },
+ { "o", open_arg, {TargetCurrent} },
+ { "open", open_arg, {TargetCurrent} },
+ { "q", quit, {0} },
+ { "quit", quit, {0} },
+ { "re", navigate, {NavigationReload} },
+ { "re!", navigate, {NavigationForceReload} },
+ { "reload", navigate, {NavigationReload} },
+ { "reload!", navigate, {NavigationForceReload} },
+ { "qt", search_tag, {0} },
+ { "st", navigate, {NavigationCancel} },
+ { "stop", navigate, {NavigationCancel} },
+ { "t", open_arg, {0} },
+ { "tabopen", open_arg, {TargetNew} },
+ { "print", print_frame, {0} },
+ { "bma", bookmark, {0} },
+ { "bookmark", bookmark, {0} },
+ { "source", view_source, {0} },
+ // { "set", browser_settings, {0} },
+ // { "map", mappings, {0} },
+ { "jumpleft", scroll, {ScrollJumpTo | DirectionLeft} },
+ { "jumpright", scroll, {ScrollJumpTo | DirectionRight} },
+ { "jumptop", scroll, {ScrollJumpTo | DirectionTop} },
+ { "jumpbottom", scroll, {ScrollJumpTo | DirectionBottom} },
+ { "pageup", scroll, {ScrollMove | DirectionTop | UnitPage} },
+ { "pagedown", scroll, {ScrollMove | DirectionBottom | UnitPage} },
+ { "navigationback", navigate, {NavigationBack} },
+ { "navigationforward", navigate, {NavigationForward} },
+ { "scrollleft", scroll, {ScrollMove | DirectionLeft | UnitLine} },
+ { "scrollright", scroll, {ScrollMove | DirectionRight | UnitLine} },
+ { "scrollup", scroll, {ScrollMove | DirectionTop | UnitLine} },
+ { "scrolldown", scroll, {ScrollMove | DirectionBottom | UnitLine} },
+ { "ls", list, {0} },
+ { "winopen", window, {CreateWindow} },
+ { "winclose", window, {DeleteWindow} },
+};
+
+#if 0
+static Mouse mouse[] = {
+ /* modmask, modkey, button, function, argument */
+ {0, 0, 2, paste, {TargetCurrent | ClipboardPrimary | ClipboardGTK, rememberedURI} },
+ {"Control", 0, 2, paste, {TargetNew | ClipboardPrimary | ClipboardGTK} },
+ {"Control", 0, 1, open_remembered, {TargetNew} },
+};
+#endif
#endif