Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"CTRL + - to disable advanced options for this column" doesn't work #95

Closed
cjunekim opened this issue Jan 22, 2023 · 6 comments
Closed

Comments

@cjunekim
Copy link

cjunekim commented Jan 22, 2023

Hello,

According to the README.md,

CTRL + +/-  Enable/disable advanced options for this column

Hitting CTRL with Num Plus really enables advanced options for the column. CTRL with ordinary Plus doesn't seem to do anything.

However, hitting CTRL with Num Minus doesn't disable advanced options, but instead plays the transport. Hitting CTRL with ordinary Minus inserts OFF notes to all the channels.

Tested on Window 10, Reaper v6.73, Hackey-Trackey v3.18

@cjunekim
Copy link
Author

cjunekim commented Jan 22, 2023

I think I found the cause of this malbehaviour, but I don't understand that part's true intention.

From tracker.lua file at

keys.playfrom = { 1, 0, 0, 13 } -- Ctrl + Enter
and
keys.showLess = { 1, 0, 0, 13 } -- CTRL + -
:

  if keyset == "default" then
    --                    CTRL    ALT SHIFT Keycode
    ......
    keys.playfrom       = { 1,    0,  0,    13 }            -- Ctrl + Enter
    ......  
    keys.showLess       = { 1,    0,  0,    13 }            -- CTRL + -

As you see, the keycodes for playfrom and showLess are the same. It seems like playfrom is handled first and showLess is ignored.

As far as I know, the numpad Minus' keycode is 269. I guess it is somehow handled as if one byte value and hence it overflows and wraps around to 13, which equals to 269-256.

@cjunekim
Copy link
Author

cjunekim commented Jan 22, 2023

After some research, it seems to be Reaper's bug. There are some strange things in gfx_getchar's return value.

There is no other way to discern ctrl+enter and ctrl+-(numpad). There are many other overlaps, for example ctrl+i and ctrl+tab. I believe there are a few dozens.

Hence, I suggest we change the default keymapping and choose a different one.

I posted a bug report for this at the reaper forum. https://forum.cockos.com/showthread.php?t=275130

@JoepVanlier
Copy link
Owner

Good catch! Funny that I never noticed this. What would you suggest as alternative binding?

@cjunekim
Copy link
Author

Maybe, ctrl+, and ctrl+. for decrease and increase column, for their duality and left/right metaphor by the keyboard(<> are their shift keys).

keys.showMore       = { 1,    0,  0,    46 }            -- CTRL + .
keys.showLess       = { 1,    0,  0,    44 }            -- CTRL + ,

I confirmed that this key pattern isn't used anywhere in the tracker.lua code.

@JoepVanlier
Copy link
Owner

JoepVanlier commented Jan 23, 2023

Maybe, ctrl+, and ctrl+. for decrease and increase column, for their duality and left/right metaphor by the keyboard(<> are their shift keys).

keys.showMore       = { 1,    0,  0,    46 }            -- CTRL + .
keys.showLess       = { 1,    0,  0,    44 }            -- CTRL + ,

I confirmed that this key pattern isn't used anywhere in the tracker.lua code.

I like that idea. Either that, or switch playFrom to CTRL + ALT + Enter. Do you want to make a PR for it, or should I?

@JoepVanlier
Copy link
Owner

Decided to go with rebinding PlayFrom instead (see #96). Thank you for the bug report. Note that if you prefer your own keyset, you can add a few lines to userkeys.lua to get exactly the keymapping you want. I'm closing this as resolved, but please don't hesitate to let me know if there are further issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants