From d232012287fe2e6e829ce9e4c20e0d9f9dc4ed5e Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 22 Sep 2012 14:54:57 +0200 Subject: input: handle escapes always in command parser Previously, both the command parser and property expansion (m_properties_expand_string) handled escapes with '\'. Move all escape handling into the command parser, and remove it from the property code. This removes the need to escape strings twice for commands that use property expansion. The command parser is practically rewritten: it uses m_option for the actual parsing, and reduces hackish C-string handling. --- etc/input.conf | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'etc') diff --git a/etc/input.conf b/etc/input.conf index a32495ab3a..257a4538c9 100644 --- a/etc/input.conf +++ b/etc/input.conf @@ -11,15 +11,13 @@ # # Note that merely removing default key bindings from this file won't remove # the default bindings mplayer was compiled with, unless -# --input=nodefault-bindings +# --input=no-default-bindings # is specified. # # Lines starting with # are comments. Use SHARP to assign the # key. # -# Some characters need to be escaped. In particular, if you want to display -# a '\' character as part of an osd_show_property_text OSD message, you have to -# escape 2 times: -# key osd_show_property_text "This is a single backslash: \\\\!" +# Strings need to be quoted and escaped: +# KEY show_text "This is a single backslash: \\ and a quote: \" !" # # You can use modifier-key combinations like Shift+Left or Ctrl+Alt+x with # modifiers Shift, Ctrl, Alt and Meta, but note that currently reading -- cgit v1.2.3