Menu

#89 Backslash returns wrong sdk value?

v1.0_(example)
open
nobody
ryosmkfx (1)
1
2017-11-03
2017-10-25
Anonymous
No

I'm sort of confused at the moment what's going on - all the other keys work fine but backslash returns 255 as the sdk value, and crashes ripple.lua when pressed. It also cannot be set a color from a script, except set_all_colors() works for it.

Discussion

  • Anonymous

    Anonymous - 2017-10-26

    After about 16 hours digging through the source code (and several hours sleeping) I've come up with a patch that fixes this at least on the keyboard itself, though it doesn't work with the emulator and may also break the DE layout. I hope this helps something at least.

     
  • Stefan Achatz

    Stefan Achatz - 2017-10-29

    To verify this, could you please clarify which keyboard layout and sdk value you are having problems with?

     
  • Anonymous

    Anonymous - 2017-10-29

    It's a Ryos MK FX with the US layout, the SDK value is 72 if I'm recalling correctly.

     
  • Stefan Achatz

    Stefan Achatz - 2017-11-03

    The primary problem in this problem is that the return keys in us and german layouts use different switches.
    I have some issues understanding your patch.
    The first two chunks are unnecessary/wrong, because 0x38 is already in the list and 0x43 is valid for german layout.
    In other chunks you are changing sdk_index value 73, which, according to the sdk docs, is the value for the return key.
    The value 72 you mentioned would be the effect_index sent by the keyboard for the backslash key, which only should be converted to 52, the sdk value.
    Would you like to test the following patch (please undo your changes first) and tell me if reporting and color setting in lua works:

    diff --git a/ryosmkfx/libroccatryosmkfx/ryosmkfx_key_relations.c b/ryosmkfx/libroccatryosmkfx/ryosmkfx_key_relations.c
    index afdb9be..124257a 100644
    --- a/ryosmkfx/libroccatryosmkfx/ryosmkfx_key_relations.c
    +++ b/ryosmkfx/libroccatryosmkfx/ryosmkfx_key_relations.c
    @@ -65,7 +65,7 @@ static guint8 const effect_index_to_sdk_index[256] = {
             38,  19,  20,  21,  23,  25,  28,  50, 255,  15, /* 4 */
             56,  58,  39,  40,  42,  22,  24,  26,  48,  51, /* 5 */
             30,  31,  57,  59,  60,  41,  43,  44,  45,  47, /* 6 */
    
    -        49,  72, 255,  32,  74,  76,  61,  62,  64,  66, /* 7 */
    +        49,  72,  52,  32,  74,  76,  61,  62,  64,  66, /* 7 */
             46,  69,  70,  73,  52,  33,  75, 255,  77,  63, /* 8 */
             65,  67,  68,  86,  71,  89,  90,  53,  92,  94, /* 9 */
             78,  79,  81,  83,  85,  87,  88, 255, 104,  54, /* 10*/
    @@ -88,7 +88,7 @@ static guint8 const effect_index_to_sdk_index[256] = {
    
     guint8 ryosmkfx_effect_index_to_sdk_index(guint8 effect_index) {
            /* Value range of effect index is 16-134
    
    -        * also effect index is light/layer index - 16
    +        * also effect index is mostly light/layer index - 16
             */
            return effect_index_to_sdk_index[effect_index];
     }
    

    One more thing: yould you please tell me the effect_index sent by the keyboard for you return key?

     

    Last edit: Stefan Achatz 2017-11-03

Anonymous
Anonymous

Add attachments
Cancel