about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 12:10:29 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 12:10:29 +0000
commitb2e8e5c0d9573c799d568973f688aeca4492209a (patch)
tree71b44930d9172c3609320c9ce3a8aea9035913e7 /Completion
parent7982dce342b271bf464669bd9b14178143f316fe (diff)
downloadzsh-b2e8e5c0d9573c799d568973f688aeca4492209a.tar.gz
zsh-b2e8e5c0d9573c799d568973f688aeca4492209a.tar.xz
zsh-b2e8e5c0d9573c799d568973f688aeca4492209a.zip
moved from Completion/X/_x_keysym
Diffstat (limited to 'Completion')
-rw-r--r--Completion/X/Type/_x_keysym22
1 files changed, 22 insertions, 0 deletions
diff --git a/Completion/X/Type/_x_keysym b/Completion/X/Type/_x_keysym
new file mode 100644
index 000000000..39fbaebdd
--- /dev/null
+++ b/Completion/X/Type/_x_keysym
@@ -0,0 +1,22 @@
+#autoload
+
+local expl
+
+_tags keysyms || return 1
+
+if (( ! $+_keysym_cache )); then
+  local file
+
+  file=( /usr/{include,{{X11R6,openwin},local{,/X11{,R6}}}/include}/X11/keysymdef.h(N) )
+
+  if (( $#file )); then
+    _keysym_cache=( "${(@)${(@)${(M@)${(@f)$(< $file[1])}:#\#define[ 	]##XK_*}#\#define[ 	]##XK_}%%[ 	]*}" )
+  else
+    _keysym_cache=( BackSpace Tab Linefeed Clear Return Pause Escape 
+                    Delete Left Right Up Down Space Home Begin End
+		    F{1,2,3,4,5,6,7,8,9,10,11,12} )
+  fi
+fi
+
+_wanted keysyms expl 'key symbol' \
+    compadd "$@" -M 'm:{a-z}={A-Z} r:|-=* r:|=*' -a _keysym_cache