about summary refs log tree commit diff
path: root/Completion/X/_x_keysym
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-23 13:09:12 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-23 13:09:12 +0000
commitfec17bab421362973fcbd3a55c6365e39039c95d (patch)
treec10ee7e6b7ebb3418556eef7bd15430b6dd046ef /Completion/X/_x_keysym
parent1244fb81d26a35da21f4b60b03c8d7afd3ed13a7 (diff)
downloadzsh-fec17bab421362973fcbd3a55c6365e39039c95d.tar.gz
zsh-fec17bab421362973fcbd3a55c6365e39039c95d.tar.xz
zsh-fec17bab421362973fcbd3a55c6365e39039c95d.zip
zsh-workers/8013
Diffstat (limited to 'Completion/X/_x_keysym')
-rw-r--r--Completion/X/_x_keysym20
1 files changed, 20 insertions, 0 deletions
diff --git a/Completion/X/_x_keysym b/Completion/X/_x_keysym
new file mode 100644
index 000000000..6b031014a
--- /dev/null
+++ b/Completion/X/_x_keysym
@@ -0,0 +1,20 @@
+#autoload
+
+local expl
+
+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
+
+_description expl 'key symbol'
+compadd "$@" "$expl[@]" -M 'm:{a-z}={A-Z} r:|-=* r:|=*' - $_keysym_cache