dygma Raise keyboard keymap is wrong when used with TitanTwo

Titan Two general support. Questions, firmware update, feature request.

dygma Raise keyboard keymap is wrong when used with TitanTwo

Postby paname » Thu May 20, 2021 1:07 pm

Hi J2Kbr,

I am using a Dygma Raise keyboard and the keymap is completely wrong when used in the titan in passthrough mode.

typing the key for 'qwerty' will output 'u1ivx3'


here is the HID Descriptor :

[USB DESCRIPTOR]
12 01 00 02 EF 02 01 40 09 12 01 22 00 01 01 02 03 01 09 02 7D 00 04 01 00 A0 FA 08 0B 00 02 02 02 00 00 09 04 00 00 01 02 02 00 00 05 24 00 10 01 04 24 02 06 05 24 06 00 01 05 24 01 01 01 07 05 81 03 10 00 10 09 04 01 00 02 0A 00 00 00 07 05 02 02 40 00 00 07 05 83 02 40 00 00 09 04 02 00 01 03 00 00 00 09 21 01 01 00 01 22 AC 00 07 05 84 03 40 00 01 09 04 03 00 01 03 00 00 00 09 21 01 01 00 01 22 35 00 07 05 85 03 40 00 01

[STRING 1 DESCRIPTOR]
00 00 00 02 00 00 02 01 80 06 03 01 04 09 00 0C
0C 03 44 00 79 00 67 00 6D 00 61 00

[STRING 2 DESCRIPTOR]
00 00 00 02 00 00 02 01 80 06 03 02 04 09 00 0C
0C 03 52 00 61 00 69 00 73 00 65 00

[STRING 3 DESCRIPTOR]
00 00 00 02 00 00 02 01 80 06 03 03 04 09 00 4E
4E 03 39 00 35 00 37 00 37 00 41 00 30 00 32 00 37 00 35 00 30 00 35 00 31 00 35 00 39 00 34 00 36 00 33 00 39 00 32 00 45 00 33 00 31 00 32 00 30 00 46 00 46 00 31 00 36 00 32 00 39 00 30 00 38 00 72 00 61 00 69 00 73 00 65 00 44 00

[INTERFACE 2 HID DESCRIPTOR]
00 00 00 02 00 00 02 01 81 06 22 00 00 02 00 AC
05 0C 09 01 A1 01 85 04 15 00 26 FF 03 19 00 2A FF 03 95 04 75 10 81 00 C0 05 01 09 06 A1 01 85 08 05 07 19 E0 29 E7 15 00 25 01 75 01 95 08 81 02 05 08 19 01 29 08 95 08 75 01 91 02 05 07 75 04 95 01 81 01 19 04 29 DD 15 00 25 01 75 01 95 D9 81 02 75 03 95 01 81 01 C0 05 01 09 80 A1 01 85 05 15 00 26 FF 00 19 00 29 FF 95 01 75 08 81 00 C0 05 01 09 02 A1 01 85 01 05 09 19 01 29 08 15 00 25 01 95 08 75 01 81 02 05 01 09 30 09 31 09 38 15 81 25 7F 75 08 95 03 81 06 05 0C 0A 38 02 15 81 25 7F 75 08 95 01 81 06 C0

[INTERFACE 3 HID DESCRIPTOR]
00 00 00 02 00 00 02 01 81 06 22 00 00 03 00 35
05 01 09 02 A1 01 05 09 19 01 29 08 15 00 25 01 95 08 75 01 81 02 05 01 09 30 09 31 16 00 00 26 FF 7F 75 10 95 02 81 02 09 38 15 81 25 7F 75 08 95 01 81 06 C0

[USB SNIFF]
00 00 00 01 00 00 01 00 80 06 01 00 00 00 00 40
00 00 00 02 00 00 02 01 80 06 01 00 00 00 00 40
12 01 00 02 EF 02 01 40 09 12 01 22 00 01 01 02 03 01
00 00 00 01 00 00 01 00 00 05 00 24 00 00 00 00
00 00 00 02 00 00 02 01 00 05 00 03 00 00 00 00
24
00 00 00 01 00 00 01 00 80 06 01 00 00 00 00 12
00 00 00 02 00 00 02 01 80 06 01 00 00 00 00 12
12 01 00 02 EF 02 01 40 09 12 01 22 00 01 01 02 03 01
00 00 00 01 00 00 01 00 80 06 02 00 00 00 00 FF
00 00 00 02 00 00 02 01 80 06 02 00 00 00 00 FF
09 02 7D 00 04 01 00 A0 FA 08 0B 00 02 02 02 00 00 09 04 00 00 01 02 02 00 00 05 24 00 10 01 04 24 02 06 05 24 06 00 01 05 24 01 01 01 07 05 81 03 10 00 10 09 04 01 00 02 0A 00 00 00 07 05 02 02 40 00 00 07 05 83 02 40 00 00 09 04 02 00 01 03 00 00 00 09 21 01 01 00 01 22 AC 00 07 05 84 03 40 00 01 09 04 03 00 01 03 00 00 00 09 21 01 01 00 01 22 35 00 07 05 85 03 40 00 01
00 00 00 01 00 00 01 00 80 06 03 03 04 09 00 FF
00 00 00 02 00 00 02 01 80 06 03 03 04 09 00 FF
4E 03 39 00 35 00 37 00 37 00 41 00 30 00 32 00 37 00 35 00 30 00 35 00 31 00 35 00 39 00 34 00 36 00 33 00 39 00 32 00 45 00 33 00 31 00 32 00 30 00 46 00 46 00 31 00 36 00 32 00 39 00 30 00 38 00 72 00 61 00 69 00 73 00 65 00 44 00
00 00 00 01 00 00 01 00 80 06 03 00 00 00 00 FF
00 00 00 02 00 00 02 01 80 06 03 00 00 00 00 FF
04 03 09 04
00 00 00 01 00 00 01 00 80 06 03 02 04 09 00 FF
00 00 00 02 00 00 02 01 80 06 03 02 04 09 00 FF
0C 03 52 00 61 00 69 00 73 00 65 00
00 00 00 01 00 00 01 00 80 06 06 00 00 00 00 0A
00 00 00 02 00 00 02 02 80 06 06 00 00 00 00 0A
00 00 00 01 00 00 01 00 80 06 01 00 00 00 00 12
00 00 00 02 00 00 02 01 80 06 01 00 00 00 00 12
12 01 00 02 EF 02 01 40 09 12 01 22 00 01 01 02 03 01
00 00 00 01 00 00 01 00 80 06 02 00 00 00 00 09
00 00 00 02 00 00 02 01 80 06 02 00 00 00 00 09
09 02 7D 00 04 01 00 A0 FA
00 00 00 01 00 00 01 00 80 06 02 00 00 00 00 7D
00 00 00 02 00 00 02 01 80 06 02 00 00 00 00 7D
09 02 7D 00 04 01 00 A0 FA 08 0B 00 02 02 02 00 00 09 04 00 00 01 02 02 00 00 05 24 00 10 01 04 24 02 06 05 24 06 00 01 05 24 01 01 01 07 05 81 03 10 00 10 09 04 01 00 02 0A 00 00 00 07 05 02 02 40 00 00 07 05 83 02 40 00 00 09 04 02 00 01 03 00 00 00 09 21 01 01 00 01 22 AC 00 07 05 84 03 40 00 01 09 04 03 00 01 03 00 00 00 09 21 01 01 00 01 22 35 00 07 05 85 03 40 00 01
00 00 00 01 00 00 01 00 00 09 00 01 00 00 00 00
00 00 00 02 00 00 02 01 00 09 00 01 00 00 00 00
00 00 00 01 00 00 01 00 80 06 03 02 04 09 00 04
00 00 00 02 00 00 02 01 80 06 03 02 04 09 00 04
0C 03 52 00
00 00 00 01 00 00 01 00 80 06 03 00 00 00 00 FF
00 00 00 02 00 00 02 01 80 06 03 00 00 00 00 FF
04 03 09 04
00 00 00 01 00 00 01 00 80 06 03 02 04 09 00 0C
00 00 00 02 00 00 02 01 80 06 03 02 04 09 00 0C
0C 03 52 00 61 00 69 00 73 00 65 00
00 00 00 01 00 00 01 00 80 06 03 01 04 09 00 FF
00 00 00 02 00 00 02 01 80 06 03 01 04 09 00 FF
0C 03 44 00 79 00 67 00 6D 00 61 00
00 00 00 01 00 00 01 00 80 06 03 02 04 09 00 FF
00 00 00 02 00 00 02 01 80 06 03 02 04 09 00 FF
0C 03 52 00 61 00 69 00 73 00 65 00
00 00 00 01 00 00 01 00 80 06 03 02 04 09 00 04
00 00 00 02 00 00 02 01 80 06 03 02 04 09 00 04
0C 03 52 00
00 00 00 01 00 00 01 00 80 06 03 02 04 09 00 0C
00 00 00 02 00 00 02 01 80 06 03 02 04 09 00 0C
0C 03 52 00 61 00 69 00 73 00 65 00
00 00 00 01 00 00 01 00 80 06 03 02 04 09 00 04
00 00 00 02 00 00 02 01 80 06 03 02 04 09 00 04
0C 03 52 00
00 00 00 01 00 00 01 00 80 06 03 02 04 09 00 0C
00 00 00 02 00 00 02 01 80 06 03 02 04 09 00 0C
0C 03 52 00 61 00 69 00 73 00 65 00
00 00 00 01 00 00 01 00 A1 21 00 00 00 00 00 07
00 00 00 02 00 00 02 01 A1 21 00 00 00 00 00 07
00 C2 01 00 00 00 08
00 00 00 01 00 00 01 00 21 22 00 00 00 00 00 00
00 00 00 02 00 00 02 01 21 22 00 00 00 00 00 00
00 00 00 01 00 00 01 00 21 20 00 00 00 00 00 07
00 00 00 02 00 00 01 01 21 20 00 00 00 00 00 07
00 00 00 01 00 00 02 00 21 20 00 00 00 00 00 07
00 C2 01 00 00 00 08
00 00 00 01 00 00 01 00 A1 21 00 00 00 00 00 07
00 00 00 02 00 00 02 01 A1 21 00 00 00 00 00 07
21 20 00 00 00 00 07
00 00 00 01 00 00 01 00 21 0A 00 00 00 02 00 00
00 00 00 02 00 00 02 04 21 0A 00 00 00 02 00 00
00 00 00 01 00 00 01 00 81 06 22 00 00 02 00 EC
00 00 00 02 00 00 02 04 81 06 22 00 00 02 00 EC
00 00 00 01 00 00 01 00 80 06 01 00 00 00 00 40
00 00 00 02 00 00 02 01 80 06 01 00 00 00 00 40
12 01 00 02 EF 02 01 40 09 12 01 22 00 01 01 02 03 01
00 00 00 01 00 00 01 00 00 05 00 24 00 00 00 00
00 00 00 02 00 00 02 01 00 05 00 03 00 00 00 00
24
00 00 00 01 00 00 01 00 80 06 01 00 00 00 00 12
00 00 00 02 00 00 02 04 80 06 01 00 00 00 00 12
00 00 00 01 00 00 01 00 80 06 01 00 00 00 00 40
00 00 00 02 00 00 02 01 80 06 01 00 00 00 00 40
12 01 00 02 EF 02 01 40 09 12 01 22 00 01 01 02 03 01
00 00 00 01 00 00 01 00 00 05 00 24 00 00 00 00
00 00 00 02 00 00 02 01 00 05 00 03 00 00 00 00
24
00 00 00 01 00 00 01 00 80 06 01 00 00 00 00 12
00 00 00 02 00 00 02 01 80 06 01 00 00 00 00 12
12 01 00 02 EF 02 01 40 09 12 01 22 00 01 01 02 03 01
00 00 00 01 00 00 01 00 00 09 00 01 00 00 00 00
00 00 00 02 00 00 02 01 00 09 00 01 00 00 00 00
00 00 00 01 00 00 01 00 02 01 00 00 00 84 00 00
00 00 00 02 00 00 02 01 02 01 00 00 00 84 00 00
00 00 00 01 00 00 01 00 81 06 22 00 00 02 00 EC
00 00 00 02 00 00 02 01 81 06 22 00 00 02 00 EC
05 0C 09 01 A1 01 85 04 15 00 26 FF 03 19 00 2A FF 03 95 04 75 10 81 00 C0 05 01 09 06 A1 01 85 08 05 07 19 E0 29 E7 15 00 25 01 75 01 95 08 81 02 05 08 19 01 29 08 95 08 75 01 91 02 05 07 75 04 95 01 81 01 19 04 29 DD 15 00 25 01 75 01 95 D9 81 02 75 03 95 01 81 01 C0 05 01 09 80 A1 01 85 05 15 00 26 FF 00 19 00 29 FF 95 01 75 08 81 00 C0 05 01 09 02 A1 01 85 01 05 09 19 01 29 08 15 00 25 01 95 08 75 01 81 02 05 01 09 30 09 31 09 38 15 81 25 7F 75 08 95 03 81 06 05 0C 0A 38 02 15 81 25 7F 75 08 95 01 81 06 C0
00 00 00 01 00 00 01 00 21 0A 00 00 00 03 00 00
00 00 00 02 00 00 02 04 21 0A 00 00 00 03 00 00
00 00 00 01 00 00 01 00 81 06 22 00 00 03 00 75
00 00 00 02 00 00 02 01 81 06 22 00 00 03 00 75
15 00 25 01 95 08 75 01 81 02 05 01 09 30 09 31 09 38 15 81 25 7F 75 08 95 03 81 06 05 0C 0A 38 02 15 81 25 7F 75 08 95 01 81 06 C0
00 00 00 01 00 00 01 00 81 06 22 00 00 03 00 75
00 00 00 02 00 00 02 01 81 06 22 00 00 03 00 75
05 01 09 02 A1 01 05 09 19 01 29 08 15 00 25 01 95 08 75 01 81 02 05 01 09 30 09 31 16 00 00 26 FF 7F 75 10 95 02 81 02 09 38 15 81 25 7F 75 08 95 01 81 06 C0
00 00 00 01 00 00 01 00 21 09 02 08 00 02 00 02
00 00 00 02 00 00 01 01 21 09 02 08 00 02 00 02
00 00 00 01 00 00 02 00 21 09 02 08 00 02 00 02
08 01



and the test gpc code :

Code: Select all
 
#pragma METAINFO("test", 1, 0, "paname")
#include <keyboard.gph>
 
 
 
 
init {
 
 
 
}
 
main {
 
    key_passthru();
 
 
}
 


thanks for your help
User avatar
paname
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 204
Joined: Wed Jan 07, 2015 3:02 pm

Re: dygma Raise keyboard keymap is wrong when used with Tita

Postby paname » Sat May 22, 2021 3:20 pm

User avatar
paname
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 204
Joined: Wed Jan 07, 2015 3:02 pm

Re: dygma Raise keyboard keymap is wrong when used with Tita

Postby paname » Thu May 27, 2021 6:08 pm

Image

is J2KBr still active in this forum ? last visit is 2 months ago.


thanks
User avatar
paname
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 204
Joined: Wed Jan 07, 2015 3:02 pm

Re: dygma Raise keyboard keymap is wrong when used with Tita

Postby Mad » Thu May 27, 2021 9:35 pm

paname wrote:is J2KBr still active in this forum ? last visit is 2 months ago.

Not currently, he's working hard. :smile0517: but since you posted to github he will be able to check it before the next release.
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: dygma Raise keyboard keymap is wrong when used with Tita

Postby paname » Thu Jun 10, 2021 12:57 pm

ok decided to implement directly the needed GPC like logic in my keyboard firmware as a custom plugin ( kaleidoscope based )
so this is not needed anymore.

cheers.

for the curious (NOT A GPC CODE ) , it is a simple destiny Quickdraw glitch on 2tap the switch buttons along with a jump button repeat for fast warlock boost. (bound to F24 and F23 in the keymap respectively )


Code: Select all
 
#include <Kaleidoscope-QuickDraw.h>
 
namespace kaleidoscope {
  namespace plugin {
 
    // QuickDraw
 
 
 
    // Member variables.
    bool QuickDraw::disabled_         = false;
    uint16_t QuickDraw::timeout_      = 100; // In ms.
    uint8_t QuickDraw::tap_threshold_ = 2;
    uint8_t QuickDraw::tap_count_     = 0;
    uint16_t QuickDraw::qd_hold_timeout_ = 10;
    uint16_t QuickDraw::jump_hold_timeout_ = 5;
    uint32_t QuickDraw::start_time_   = 0;
    uint32_t QuickDraw::qd_hold_start_time_   = 0;
    uint32_t QuickDraw::jump_hold_start_time_   = 0;
 
 
    Key QuickDraw::shortcut_[] = { Key_NoKey, Key_NoKey };
 
    QuickDraw::QuickDraw() {
      use_windows();
    }
 
    // Basic plugin status functions.
 
    // Enable the plugin.
    void QuickDraw::enable() {
      disabled_ = false;
    }
 
    // Disable the plugin.
    void QuickDraw::disable() {
      disabled_ = true;
    }
 
    // Returns true if the plugin is enabled.
    bool QuickDraw::active() {
      return !disabled_;
    }
 
    // OS behavior
    void QuickDraw::use_windows() {
 
    }
 
 
    // Getters and setters
 
    // The timeout, in ms, for triggering the navigation action
    uint16_t QuickDraw::timeout() {
      return timeout_;
    }
 
    void QuickDraw::set_timeout(uint16_t new_timeout) {
      timeout_ = new_timeout;
    }
 
    // The number of taps needed to trigger the navigation action
    uint8_t QuickDraw::tap_threshold() {
      return tap_threshold_;
    }
 
    void QuickDraw::set_tap_threshold(uint8_t new_threshold) {
      tap_threshold_ = new_threshold;
    }
 
    bool QDGlitch = false;
    bool JUMPGlitch = false;
    bool Key_W_Pressed = false;
    // Event handlers.
 
 
    EventHandlerResult QuickDraw::onKeyswitchEvent(Key &mapped_key, KeyAddr key_addr, uint8_t key_state) {
      // Track W state
      // if(mapped_key == Key_W) {
      //
      //   if(keyIsPressed(key_state)){
      //     Key_W_Pressed = true
      //   } else  {
      //     Key_W_Pressed = false
      //   }
      //
      // }
      if(disabled_ ) {
        return EventHandlerResult::OK;
      }
      if(mapped_key == Key_F24) { // Key_F24 pressed
 
 
        if(start_time_ != 0 && Kaleidoscope.hasTimeExpired(start_time_, timeout_)) {
          reset();
        }
 
        if(keyToggledOff(key_state)) {
          start_time_ = Kaleidoscope.millisAtCycleStart();
          Runtime.hid().keyboard().pressRawKey(Key_LeftShift); // COMMENT
          if (QDGlitch) {
            qd_hold_start_time_ = 0;
          }
        }
        else if(keyToggledOn(key_state)) {
          tap_count_++;
          if(tap_count_ == tap_threshold_) {
            QDGlitch = true;
            qd_hold_start_time_ = Kaleidoscope.millisAtCycleStart();
            reset();
 
          } else {
            QDGlitch = false;
          }
        }
        if(keyIsPressed(key_state)) {
          if (QDGlitch) {
            if (!Kaleidoscope.hasTimeExpired(qd_hold_start_time_, qd_hold_timeout_)) {
              //Runtime.hid().keyboard().pressRawKey(Key_C);
              Runtime.hid().keyboard().pressRawKey(Key_X);
            }
          } else {
            Runtime.hid().keyboard().pressRawKey(Key_X);
          }
 
          return EventHandlerResult::EVENT_CONSUMED;
        }
      } // Key_F24 pressed
 
      if(mapped_key == Key_F23) {
 
 
        if(keyIsPressed(key_state)) {
 
            if (Kaleidoscope.hasTimeExpired(jump_hold_start_time_, jump_hold_timeout_)) {
                jump_hold_start_time_ = Kaleidoscope.millisAtCycleStart();
                JUMPGlitch = !JUMPGlitch;
            }
 
            if (JUMPGlitch) {
            Runtime.hid().keyboard().pressRawKey(Key_Spacebar);
            }
 
          return EventHandlerResult::EVENT_CONSUMED;
        }
      }
 
 
 
      return EventHandlerResult::OK;
    }
 
 
 
    void QuickDraw::reset(void) {
      tap_count_  = 0;
      start_time_       = 0;
    }
 
  }  // namespace plugin
}  // namespace kaleidoscope
 
kaleidoscope::plugin::QuickDraw QuickDraw;
 
 
User avatar
paname
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 204
Joined: Wed Jan 07, 2015 3:02 pm


Return to Titan Two Device

Who is online

Users browsing this forum: No registered users and 113 guests