Disable hardware keys on Cyanogenmod 12.1 / SM-T800 (Samsung Galaxy Tab S)


Question

I've hated the hardware keys on my Samsung tablet since I bought it. Even after a year, I have to be careful not to brush the keys with my palm or else I'm suddenly exiting the book I'm reading or web page I'm viewing.



I rooted the device to try and fix this, however the instructions I've found for enabling on-screen navigation (by editing build.props) either gave me a black bar with no navigation buttons or, on later Samsung updates, prevented my tablet from booting.



I finally got around to installing CyanogenMod 12.1 (cm_chagallwifi-userdebug 5.1.1 LMY49J 11fa7f9ea1), and I can enable on-screen navigation using the following command (taken from this question):



settings put secure dev_force_show_navbar 1


Now I need to disable the hardware buttons. Most instructions I've found indicate to edit /system/usr/keylayout/Geneic.kl and comment out the keys for HOME, BACK and MENU. I mounted /system as read-write and commented out keycodes 127 (Menu), 158 (back)and 172 (home). Yet after a reboot, my hardware keys are still enabled!



I also cannot disable the LEDs on the keys either. I found a script that attempt to do this sending a 0 to /sys/class/leds/button-backlight/brightness, which does not exist on my CM12.1 system. I can't find any other files under /sys/class/leds that seem to deal with the hardware button backlights either and there's nothing in the settings menu for them.



All I want is to be able to disable the hardware keys. Turning off the LEDs would be nice too.


Answer

I got an answer for this on this xda developers thread:



Isnt the key file in cm called something different sec_touchscreen.kl or something or other? 


Why yes ashyx, it is! In fact, it only has two entries! One is for the app switcher button and the other for the back button. After commenting out these lines, the buttons were disabled.



After digging through the settings, I also found that the button back lights are adjustable in this build of Cyanogen and was able to turn them off.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes