public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Aristeu Sergio Rozanski Filho <aris@ruivo.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: BlueZ development <bluez-devel@lists.sourceforge.net>,
	Bastien Nocera <hadess@hadess.net>
Subject: Re: [Bluez-devel] [RFC][PATCH 4/4] add support to ps3 remote	controller
Date: Thu, 25 Oct 2007 09:48:55 -0400	[thread overview]
Message-ID: <20071025134855.GH407@cathedrallabs.org> (raw)
In-Reply-To: <d120d5000710090651q5beb218fl79fbfba3cb02b94c@mail.gmail.com>

Here's the updated version of the table with some comments:

+static unsigned int ps3remote_keymap[] = {
+	[0x16] = KEY_EJECTCD,
+	[0x64] = KEY_AUDIO,
+	[0x65] = KEY_ANGLE,
+	[0x63] = KEY_SUBTITLE,
+	[0x0f] = KEY_CLEAR,
+	[0x28] = KEY_TIME,
+	[0x00] = KEY_1,
+	[0x01] = KEY_2,
+	[0x02] = KEY_3,
+	[0x03] = KEY_4,
+	[0x04] = KEY_5,
+	[0x05] = KEY_6,
+	[0x06] = KEY_7,
+	[0x07] = KEY_8,
+	[0x08] = KEY_9,
+	[0x09] = KEY_0,
these I really have no idea. KEY_REMOTE{1,2,3...}? having KEY_1, KEY_KP1
and KEY_something_else is really confusing. perhaps create a device
which always has numlock on?

+	[0x81] = KEY_RED,
+	[0x82] = KEY_GREEN,
+	[0x80] = KEY_BLUE,
+	[0x83] = KEY_YELLOW,
+	[0x70] = KEY_INFO,		/* display */
+	[0x1a] = KEY_MENU,		/* top menu */
+	[0x40] = KEY_CONTEXT_MENU,	/* pop up/menu */
+	[0x0e] = KEY_ESC,		/* return */
+	[0x5c] = KEY_OPTION,		/* options/triangle */
+	[0x5d] = KEY_BACK,		/* back/circle */
+	[0x5f] = KEY_SCREEN,		/* view/square */
+	[0x5e] = KEY_ENTER,		/* cross */
+	[0x54] = KEY_UP,
+	[0x56] = KEY_DOWN,
+	[0x57] = KEY_LEFT,
+	[0x55] = KEY_RIGHT,
+	[0x0b] = KEY_ENTER,
+	[0x5a] = BTN_TL,		/* L1 */
+	[0x58] = BTN_TL2,		/* L2 */
+	[0x51] = BTN_THUMBL,		/* L3 */
+	[0x5b] = BTN_TR,		/* R1 */
+	[0x59] = BTN_TR2,		/* R2 */
+	[0x52] = BTN_THUMBR,		/* R3 */
I think we should keep these as BTN, they're joystick buttons anyway.
the remote is a mix of remote with joystick.

+	[0x43] = KEY_HOMEPAGE,		/* PS button */
+	[0x50] = KEY_SELECT,
+	[0x53] = BTN_START,
same here, perhaps go back to BTN_SELECT too?

+	[0x33] = KEY_REWIND,		/* scan back */
+	[0x32] = KEY_PLAY,
+	[0x34] = KEY_FORWARD,		/* scan forward */
+	[0x30] = KEY_PREVIOUS,
+	[0x38] = KEY_STOP,
+	[0x31] = KEY_NEXT,
+	[0x60] = KEY_FRAMEBACK,		/* slow/step back */
+	[0x39] = KEY_PAUSE,
+	[0x61] = KEY_FRAMEFORWARD,	/* slow/step forward */
created these, input.h patch attached

+	[0xff] = KEY_MAX,
+};

What you think Dmitry?

---
 include/linux/input.h |    2 ++
 1 file changed, 2 insertions(+)

--- linus-2.6.orig/include/linux/input.h	2007-10-25 09:22:03.000000000 -0400
+++ linus-2.6/include/linux/input.h	2007-10-25 09:23:39.000000000 -0400
@@ -526,6 +526,8 @@ struct input_absinfo {
 #define KEY_DISPLAYTOGGLE	0x1af	/* Turn display (LCD) on and off */
 #define KEY_SPELLCHECK		0x1b0   /* AL Spell Check */
 #define KEY_LOGOFF		0x1b1   /* AL Logoff */
+#define KEY_FRAMEBACK		0x1b2
+#define KEY_FRAMEFORWARD	0x1b3
 
 #define KEY_DEL_EOL		0x1c0
 #define KEY_DEL_EOS		0x1c1

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

      parent reply	other threads:[~2007-10-25 13:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-07 18:40 [Bluez-devel] [RFC][PATCH 4/4] add support to ps3 remote controller Aristeu Sergio Rozanski Filho
2007-10-07 19:23 ` Bastien Nocera
2007-10-07 23:42   ` Aristeu Sergio Rozanski Filho
2007-10-09 13:51     ` Dmitry Torokhov
2007-10-09 14:06       ` Bastien Nocera
2007-10-09 14:07       ` Aristeu Sergio Rozanski Filho
2007-10-25 13:48       ` Aristeu Sergio Rozanski Filho [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071025134855.GH407@cathedrallabs.org \
    --to=aris@ruivo.org \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hadess@hadess.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox