Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  Keyremap plugin - remaps keys in rockbox
« previous next »
  • Print
Pages: 1 [2]

Author Topic: Keyremap plugin - remaps keys in rockbox  (Read 2612 times)

Offline korvin

  • Member
  • *
  • Posts: 9
Re: Keyremap plugin - remaps keys in rockbox
« Reply #15 on: July 09, 2022, 07:39:01 AM »
worstest plugin ever, it's easier to modify source code with keybinding and build/compile rockbox firmware from scratch + install it, as to force this plugin it to work. It does nothing after applying new keybindings.
« Last Edit: July 09, 2022, 07:41:13 AM by korvin »
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 883
Re: Keyremap plugin - remaps keys in rockbox
« Reply #16 on: November 09, 2022, 12:57:32 PM »
@korvin you can also make a plaintext file and import it

likely you are just picking the wrong contexts

what device and what are you trying to remap?



« Last Edit: November 09, 2022, 01:02:53 PM by Bilgus »
Logged

Offline Isaac Ness

  • Member
  • *
  • Posts: 3
Re: Keyremap plugin - remaps keys in rockbox
« Reply #17 on: December 31, 2022, 12:15:29 AM »
Hi, I'm trying to get the volume keys on my Fiio M3k to go to next/prev song on a locked player, i managed to make it work on the wps screen, but as soon as i lock the player, the keys go back to fast volume changes, also, how do i make the changes not temporary, i always need to remap everytime to do this, thank you, it's a very powerful tool
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 883
Re: Keyremap plugin - remaps keys in rockbox
« Reply #18 on: December 31, 2022, 07:30:44 AM »
Set Core Remap should load the keyremap next boot

I committed a patch that should allow you to remap while the player is locked grab the latest dev version (12/31/2022)
Reverting this adding CONTEXT_XXX_LOCKED will allow either behavior
« Last Edit: December 31, 2022, 10:59:23 AM by Bilgus »
Logged

Offline amachronic

  • Developer
  • Member
  • *
  • Posts: 271
Re: Keyremap plugin - remaps keys in rockbox
« Reply #19 on: December 31, 2022, 08:04:35 AM »
@Isaac so are you trying to make it behave like the original firmware - change volume when unlocked, and skip tracks only when locked?

in case you didn't know there's already a default key mapping to skip tracks while locked: hold the PLAY button (small circular one) while pressing the volume buttons.
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 883
Re: Keyremap plugin - remaps keys in rockbox
« Reply #20 on: December 31, 2022, 04:12:25 PM »
Ok the key remap plugin now has _LOCKED contexts added for devices with HAVE_LOCKED_ACTIONS

so far thats the M3k, the ClipV2, ClipPlus, ClipZip

you will need the latest dev version (>= 12/31/2020)

here is an example keymap.txt for the clip(s) to remap the volume buttons to volup and voldn
and disable the regular action of left and right (skip prev/next) while locked
(and be sure use 'advanced key lock' set to allowing track skips)

To apply use Import within the plugin once you save to a .txt file
Code: [Select]
# Key Remap
# Device: Sandisk Sansa
# Entries: 5

# Each entry should be PROPER_CASE and on its own line
# Comments run to end of line

CONTEXT_WPS_LOCKED = {
    {ACTION_WPS_SKIPNEXT, BUTTON_VOL_UP, BUTTON_NONE},
    {ACTION_STD_CANCEL, BUTTON_RIGHT | BUTTON_REL, BUTTON_RIGHT},
    {ACTION_WPS_SKIPPREV, BUTTON_VOL_DOWN, BUTTON_NONE},
    {ACTION_STD_CANCEL, BUTTON_LEFT | BUTTON_REL, BUTTON_LEFT},
}

note: you can use ACTION_REDRAW instead of ACTION_STD_CANCEL
if you want to supress the 'Buttons Locked' message



« Last Edit: December 31, 2022, 04:13:58 PM by Bilgus »
Logged

Offline Isaac Ness

  • Member
  • *
  • Posts: 3
Re: Keyremap plugin - remaps keys in rockbox
« Reply #21 on: December 31, 2022, 08:50:39 PM »
Quote from: amachronic on December 31, 2022, 08:04:35 AM
@Isaac so are you trying to make it behave like the original firmware - change volume when unlocked, and skip tracks only when locked?

in case you didn't know there's already a default key mapping to skip tracks while locked: hold the PLAY button (small circular one) while pressing the volume buttons.

Whoah, than you, that's a life saver!
Logged

Offline Isaac Ness

  • Member
  • *
  • Posts: 3
Re: Keyremap plugin - remaps keys in rockbox
« Reply #22 on: December 31, 2022, 08:52:25 PM »
Quote from: Bilgus on December 31, 2022, 04:12:25 PM
Ok the key remap plugin now has _LOCKED contexts added for devices with HAVE_LOCKED_ACTIONS

so far thats the M3k, the ClipV2, ClipPlus, ClipZip

you will need the latest dev version (>= 12/31/2020)

here is an example keymap.txt for the clip(s) to remap the volume buttons to volup and voldn
and disable the regular action of left and right (skip prev/next) while locked
(and be sure use 'advanced key lock' set to allowing track skips)

To apply use Import within the plugin once you save to a .txt file
Code: [Select]
# Key Remap
# Device: Sandisk Sansa
# Entries: 5

# Each entry should be PROPER_CASE and on its own line
# Comments run to end of line

CONTEXT_WPS_LOCKED = {
    {ACTION_WPS_SKIPNEXT, BUTTON_VOL_UP, BUTTON_NONE},
    {ACTION_STD_CANCEL, BUTTON_RIGHT | BUTTON_REL, BUTTON_RIGHT},
    {ACTION_WPS_SKIPPREV, BUTTON_VOL_DOWN, BUTTON_NONE},
    {ACTION_STD_CANCEL, BUTTON_LEFT | BUTTON_REL, BUTTON_LEFT},
}

note: you can use ACTION_REDRAW instead of ACTION_STD_CANCEL
if you want to supress the 'Buttons Locked' message


Thanks a lot man!, yeah i was trying to be able to skip songs on blind mode, i'll try both!
Logged

  • Print
Pages: 1 [2]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  Keyremap plugin - remaps keys in rockbox
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.068 seconds with 17 queries.