changeset 2105:447d1374ba6a

multimedia key names fltk-1.3 gives them special values, so they can't be used by specifying keysyms in keysrc anymore. I separated them from the other keys 1) so that they can be ignored when looking through the list of 'ordinary' keys 2) because Back and BackSpace could be confusing. Am I thrilled with the idea of having rules like "forward = forward"? Well, not particularly.
author corvid <corvid@lavabit.com>
date Do, 23 Jun 2011 19:58:25 +0000
parents 3e7e5395f0bc
children 85d1aa9de0e6
files ChangeLog src/keys.cc src/keysrc
diffstat 3 files changed, 24 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Do Jun 23 19:24:11 2011 +0000
+++ b/ChangeLog	Do Jun 23 19:58:25 2011 +0000
@@ -12,7 +12,7 @@
    Patches: Jorge Arellano Cid
 +- Remove --enable-ansi configure option.
  - Limit saved cookie size.
- - Allow binding to non-ASCII keys.
+ - Allow binding to non-ASCII keys and multimedia keys.
    Patches: corvid
 
 -----------------------------------------------------------------------------
--- a/src/keys.cc	Do Jun 23 19:24:11 2011 +0000
+++ b/src/keys.cc	Do Jun 23 19:58:25 2011 +0000
@@ -66,7 +66,24 @@
    { "Right",       FL_Right     },
    { "Space",       ' '          },
    { "Tab",         FL_Tab       },
-   { "Up",          FL_Up        }
+   { "Up",          FL_Up        },
+   /* multimedia keys */
+   { "Back",        FL_Back        },
+   { "Favorites",   FL_Favorites   },
+   { "Forward",     FL_Forward     },
+   { "HomePage",    FL_Home_Page   },
+   { "Mail",        FL_Mail        },
+   { "MediaNext",   FL_Media_Next  },
+   { "MediaPlay",   FL_Media_Play  },
+   { "MediaPrev",   FL_Media_Prev  },
+   { "MediaStop",   FL_Media_Stop  },
+   { "Refresh",     FL_Refresh     },
+   { "Search",      FL_Search      },
+   { "Sleep",       FL_Sleep       },
+   { "Stop",        FL_Stop        },
+   { "VolumeDown",  FL_Volume_Down },
+   { "VolumeMute",  FL_Volume_Mute },
+   { "VolumeUp",    FL_Volume_Up   },
 };
 
 static const Mapping_t modifierNames[] = {
--- a/src/keysrc	Do Jun 23 19:24:11 2011 +0000
+++ b/src/keysrc	Do Jun 23 19:58:25 2011 +0000
@@ -6,10 +6,15 @@
 # The commented-out bindings below show the defaults built into Dillo.
 #
 # Modifiers recognized: "Shift", "Ctrl", "Alt", "Meta".
+#
 # Key names recognized: "Backspace", "Delete", "Down", "End", "Esc",
 # "F1" through "F12", "Home", "Insert", "Left", "PageDown", "PageUp",
 # "Print", "Return", "Right", "Space", "Tab", "Up".
 #
+# Multimedia keys: "Back", "Favorites", "Forward", "HomePage", "Mail",
+# "MediaNext", "MediaPlay", "MediaPrev", "MediaStop", "Refresh", "Search",
+# "Sleep", "Stop", "VolumeDown", "VolumeMute", VolumeUp".
+#
 # If Dillo is running under X11, keys whose names are not recognized can
 # be specified using their keysym value in hexadecimal. Use xev to get
 # the keysym. Example rule: "0x1008ff27 = forward".