[Feature] FS#13884 #2 allow merging imported native keymaps

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Fri, 5 Jun 2026 12:09:23 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 2b963806412fad6401ce2baeb33dded4dcea310f
Author: William Wilgus <[email protected]>
Date:   Fri Jun 5 12:06:09 2026 -0400

    [Feature] FS#13884 #2 allow merging imported native keymaps
    
    allows you to import a file and merge native keymaps
    
    pops a yes no prompt to erase existing
    
    duplicates will be overwritten
    
    Change-Id: I167c6fac65775754b2a9874185d14f65638db9d7

diff --git a/apps/plugins/keyremap.c b/apps/plugins/keyremap.c
index ff10b86bba..9917bc567e 100644
--- a/apps/plugins/keyremap.c
+++ b/apps/plugins/keyremap.c
@@ -1134,7 +1134,10 @@ static int keyremap_load_file(const char *filename)
 
     if (count > 0)
     {
-        keyremap_reset_buffer();
+        if (ctx_data.ctx_count == 0 || rb->yesno_pop("Delete Current Entries?") == true)
+        {
+            keyremap_reset_buffer();
+        }
         while(--count > 0)
         {
             rb->lseek(fd, ctxpos, SEEK_SET); /* next context remap entry */
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs