Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754120AbbKLTlP (ORCPT ); Thu, 12 Nov 2015 14:41:15 -0500 Received: from mail-yk0-f174.google.com ([209.85.160.174]:36137 "EHLO mail-yk0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752282AbbKLTlO (ORCPT ); Thu, 12 Nov 2015 14:41:14 -0500 From: Marty Plummer Subject: linux-input/hid; Assistance in remapping keys with no scancode in kernel module To: linux-kernel@vger.kernel.org X-Enigmail-Draft-Status: N0201 Message-ID: <5644EB4D.5050407@gmail.com> Date: Thu, 12 Nov 2015 13:41:01 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8bbRVpltl78kptO1L0T2g2qnp4ACVfFIr" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7183 Lines: 169 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8bbRVpltl78kptO1L0T2g2qnp4ACVfFIr Content-Type: multipart/mixed; boundary="------------040101040700070005070408" This is a multi-part message in MIME format. --------------040101040700070005070408 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Greetings Having recently purchased a Logitech G105 Gaming Keyboard(046d:c248) I've= began the process of reverse engineering the effects of the proprietery Logitec= h Gaming Software (hereafter LGS) on the device to enable its full potentia= l in linux, using a number of tools (usbmon, hid-debug, virtual machines) to f= ollow the actions and logic used. As of right now, I've discovered the following: 1. That the macro key remapping (either as standard keyboard keys or full= macros) occurs in software and is not stored on the device itself (as opposed = to other Logitech GSeries devices). 2. That keys G1-6 keys (hereafter GKeys) default to functioning as F1-6 u= ntil a certain set of packets are sent to it from LGS or otherwise, after whi= ch the F1-6 functionality ends. 3. Before the F# keys are disabled, the GKeys sends hid reports on interf= ace 0 identical to 'normal' F# keys and special reports on interface 1, with= no scancode, of three bytes in size, on one hid usage, ff00.0003 (vendor = defined) after the F# keys are disabled only the reports on interface 1 remain.= 4. The M1-3 and MR keys (hereafter MKeys) send no reports on interface 0 = at all, and reports on the same usage (ff00.0003) as the GKeys. 5. One can easily determine which GKeys and MKeys are being pressed via b= itwise logic, as the three bytes follow a consistant pattern of: >03 gg mm where 03 is constant, gg is a value indicating the depressed GKeys (0x= 01 << n-1) AND'd together and mm is a value indicating the depressed MKeys (0x01 = << n-1), also AND'd together, where MR is treated as M4. 6. Absolutely no standard scancode/keycode/etc is reported for these keys= (as detectable by evtest, xev, showkeys, etc). My current dilemma is how one is to transform this data into something us= able, as the fact they all report on the same usage there is no simple way I ca= n find to remap these keys. If anyone has any insight on this matter, please assist. Information on these reports and raw usbmon logs can be found at https://github.com/GSeriesDev/gseries-tools/g105 Regards, Marty Plummer --------------040101040700070005070408 Content-Type: application/pgp-keys; name="0xC030918D.asc" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0xC030918D.asc" -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v2 mQINBFYdTKQBEACvA91vTQDLsgB0irmC3caNifDGCpr7ilWo1HiB3MAJwFUxpiDD +X10nVYPIaL0chTYVATx48GNlbLFsYa3MXFr8wISpTzRHa5El97H/MSSk5LbSJUk X4SE1lA/aAFRspfIScnfSk4OKAYREenctxbHQ2/LS/6xpqoXQLNiJKNbuH816+L2 8yFF90CnWIoDHAnNKyr0YW/cbVQkSqLhp3mjhT0NdhHPkE2JtgXPA9vEvR3YwEp6 2tbOYkP51GRCEJXgtgT1bhz/+Hyg4Tu2X05zkE3SocxXtDMBZCyIXMQE+rQcXzYR YSvpGO3ZHEJA41kW+gzj3rJPr221JUPsdItu7wisW6/GeUyzLrV5SMhTGzLWmQqM BuErTCXU4CSWaRhu9wgdL86UMMxsII7DyXvsNSltU4sRAQSa09YHzD5nEqrUSh+Y xS2DCmTjFMvrxA3u9zi70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Y/hkxQtqdTJWBvKU3ifIfd0JINx9zmKkmOLK8Rs013G0TWG6CrY5fL OOkvA27gniR9RL1719lC20K3ByjCX66EahPynE6qComFMqJpdcXRlGb7VWkC5V0l 4+i80s48QV2Ts7f4rKR+mhqOCDuD9M7/mnZb9QArk0vJQnDmixNyuwXgKOqpETfd J1WYbaeLfOUk9K/Ef2DNX0eX06ufMLAbeC2HkpuXuUh74P3FQAEOPvit/SiRPVxl iCsDKXA96pWyIoI6sr6AKXXmMwOXsn6DnXeyWf37S+qG9jazFGq4ZSJhuYqp4OtA PDE9Qw9g6bHvAnTue6j5eKZcjA=3D=3D =3DF/fe -----END PGP PUBLIC KEY BLOCK----- --------------040101040700070005070408-- --8bbRVpltl78kptO1L0T2g2qnp4ACVfFIr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWROtNAAoJEHWEtN3AMJGNOE0P/iKCdj8Qpi64sIS+u+Q92j/4 yArpdn3es3QA57sYr4fEqBlNuoh5gm2hRtZaKJiZ6EhcccgpsSB8wDyx56wmpHyU uC5vxjEBOzyLAcMNDNHHUxKale2/IECyMcMctc1B33LE/mInw3Wfz2LGM9gyQYC4 4OB4CUfg6uTbOD4WffQZU18bbVGbPjElMSVdrsHdcL0zB5LBATRYvRT1ZXBdwuhR WGeCttWSC3VbFK1mLDB+2UBOtKar9bpe8gfe0FPsBFUeJisj/5ohewwg988B9e5Q y+9aHa/1duDfafy1g+o+l2D8ZE44kdSPtLCCaC9DS9j+U5xOc7Mjg88U1yRC8Nxq CfRRnDpH7euS5/Y/ULxWCcKmCCkjE3csT3F89s3/jn/Mh96nwhVomLPmCO6Y8u9Q pLoSMM6UJVPT5ZXtcZ8/WSItMAq2H60QX+OWwk4Noh5nYYzgaRSBJYV1mIZ95E1o xjz5+t9rO7VlzYkeBffT/SGexTTPiQuLJbbFvIXIzHPl9b6FJM3EyKb+Gg8Zz1dJ qdDw9e8EWzwvM1xRZUHeItGRiX0Zi5st1pfka4nTQeH26c/8UR/fcJXimLk8uUtU MHVFs26VIak5c0rbU8xQPXKGwhECrTOf0Ssn1C8Muh+Cm5CVCiNNfdpHPWuYID7P l41wtuKcTelmK7Cox1DF =KNqr -----END PGP SIGNATURE----- --8bbRVpltl78kptO1L0T2g2qnp4ACVfFIr-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/