Skip to content

Commit

Permalink
Merge pull request #1786 from rsteube/add-showkey
Browse files Browse the repository at this point in the history
added showkey
  • Loading branch information
rsteube authored Aug 1, 2023
2 parents 7574798 + 20b35cf commit e2529e4
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
26 changes: 26 additions & 0 deletions completers/showkey_completer/cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var rootCmd = &cobra.Command{
Use: "showkey",
Short: "examine the codes sent by the keyboard",
Long: "https://linux.die.net/man/1/showkey",
Run: func(cmd *cobra.Command, args []string) {},
}

func Execute() error {
return rootCmd.Execute()
}
func init() {
carapace.Gen(rootCmd).Standalone()

rootCmd.Flags().BoolP("ascii", "a", false, "display the decimal/octal/hex values of the keys")
rootCmd.Flags().BoolP("help", "h", false, "print this usage message")
rootCmd.Flags().BoolP("keycodes", "k", false, "display only the interpreted keycodes (default)")
rootCmd.Flags().BoolP("scancodes", "s", false, "display only the raw scan-codes")
rootCmd.Flags().BoolP("version", "V", false, "print version number")
}
7 changes: 7 additions & 0 deletions completers/showkey_completer/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "github.com/rsteube/carapace-bin/completers/showkey_completer/cmd"

func main() {
cmd.Execute()
}

0 comments on commit e2529e4

Please sign in to comment.