#compdef loadkeys

case $OSTYPE in
  linux*)
    _arguments \
      '(--clearcompose -c)'{--clearcompose,-c}'[clear kernel compose table]' \
      '(--default -d)'{--default,-d}'[load default keymap file]' \
      '(--help -h)'{--help,-h}'[display help information]' \
      '(--mktable -m)'{--mktable,-m}'[output a "defkeymap.c" to stdout]' \
      '(--clearstrings)'{--clearstrings,-s}'[clear kernel string table]' \
      '*'{--verbose,-v}'[print more details]' \
      ':keymap:_files -W /usr/share/keymaps'
  ;;
  solaris*)
    _files -W /usr/share/lib/keytables
  ;;

  *) _default;;
esac
