From patchwork Wed Apr 3 09:22:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Young X-Patchwork-Id: 10883107 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C558D139A for ; Wed, 3 Apr 2019 09:22:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADEF9289BF for ; Wed, 3 Apr 2019 09:22:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A02DE289C6; Wed, 3 Apr 2019 09:22:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDD23289BF for ; Wed, 3 Apr 2019 09:22:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726263AbfDCJWD (ORCPT ); Wed, 3 Apr 2019 05:22:03 -0400 Received: from gofer.mess.org ([88.97.38.141]:60989 "EHLO gofer.mess.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725956AbfDCJWD (ORCPT ); Wed, 3 Apr 2019 05:22:03 -0400 Received: by gofer.mess.org (Postfix, from userid 1000) id 3A6E86020F; Wed, 3 Apr 2019 10:22:01 +0100 (BST) From: Sean Young To: linux-media@vger.kernel.org Subject: [PATCH v4l-utils] keytable: improve description of ir-keytable Date: Wed, 3 Apr 2019 10:22:01 +0100 Message-Id: <20190403092201.1709-1-sean@mess.org> X-Mailer: git-send-email 2.11.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Sean Young --- utils/keytable/ir-keytable.1.in | 8 +++++--- utils/keytable/keytable.c | 10 +++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/utils/keytable/ir-keytable.1.in b/utils/keytable/ir-keytable.1.in index 3ea7ea51..5237f0be 100644 --- a/utils/keytable/ir-keytable.1.in +++ b/utils/keytable/ir-keytable.1.in @@ -5,9 +5,11 @@ ir\-keytable \- a swiss\-knife tool to handle Remote Controllers. .B ir\-keytable [\fIOPTION\fR]... .SH DESCRIPTION -ir\-keytable is a tool that lists the Remote Controller devices, allows one to -get/set rc keycode/scancode tables, set protocol decoder, test events -generated by a rc device, and to adjust other Remote Controller options. +ir\-keytable is a tool that lists Remote Controller devices, loads +rc keymaps, tests events, and adjusts other Remote Controller options. +.PP +Rather than loading a rc keymap, it is also possible to set protocol decoders +and set rc scancode to keycode mappings directly. .PP Note: You need to have read permissions on /dev/input for most of the options to work. diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c index 2ad36d87..9384532b 100644 --- a/utils/keytable/keytable.c +++ b/utils/keytable/keytable.c @@ -95,7 +95,7 @@ struct cfgfile { struct cfgfile *next; }; -struct sysfs_names { +struct sysfs_names { char *name; struct sysfs_names *next; }; @@ -227,7 +227,11 @@ const char *argp_program_version = "IR keytable control version " V4L_UTILS_VERS const char *argp_program_bug_address = "Mauro Carvalho Chehab "; static const char doc[] = N_( - "\nAllows get/set IR keycode/scancode tables\n" + "\nLists Remote Controller devices, loads rc keymaps, tests events, and adjusts\n" + "other Remote Controller options. Rather than loading a rc keymap, it is also\n" + "possible to set protocol decoders and set rc scancode to keycode mappings\n" + "directly.\n" + "You need to have read permissions on /dev/input for the program to work\n" "\nOn the options below, the arguments are:\n" " SYSDEV - the rc device as found at /sys/class/rc\n" @@ -1593,7 +1597,7 @@ static void print_scancodes(const struct lirc_scancode *scancodes, unsigned coun { unsigned i; - for (i=0; i< count; i++) { + for (i=0; i< count; i++) { const char *p = protocol_name(scancodes[i].rc_proto); printf(_("%llu.%06llu: "),