Skip to content

[CCLCC] Keyboard controls unresponsive in Tips menu fix.#485

Merged
Enorovan merged 1 commit into
CommitteeOfZero:masterfrom
dendi2008:CCLCC-Tips-keyboard-fix
Jun 10, 2026
Merged

[CCLCC] Keyboard controls unresponsive in Tips menu fix.#485
Enorovan merged 1 commit into
CommitteeOfZero:masterfrom
dendi2008:CCLCC-Tips-keyboard-fix

Conversation

@dendi2008

@dendi2008 dendi2008 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

This PR will fix keyboard controls being unresponsive in CCLCC Tips menu (Issue #483).

@Enorovan Enorovan linked an issue Jun 8, 2026 that may be closed by this pull request
@dendi2008 dendi2008 force-pushed the CCLCC-Tips-keyboard-fix branch from 0f65732 to ac2f884 Compare June 8, 2026 17:18
@Enorovan Enorovan requested review from Enorovan and KKhanhH June 8, 2026 18:48
@Enorovan

Enorovan commented Jun 8, 2026

Copy link
Copy Markdown
Member

Can you check if it's not rather just a matter of modifying PADcustomA in profiles/common/scriptinput.lua

root.PADinput.PAD1UP_LS | root.PADinput.PAD1UP_DIRECT,
root.PADinput.PAD1DOWN_LS | root.PADinput.PAD1DOWN_DIRECT,
root.PADinput.PAD1LEFT_LS | root.PADinput.PAD1LEFT_DIRECT,
root.PADinput.PAD1RIGHT_LS | root.PADinput.PAD1RIGHT_DIRECT,

to

root.PADinput.PAD1UP_LS | root.PADinput.PAD1UP_DIRECT | root.PADinput.PAD1UP,
root.PADinput.PAD1DOWN_LS | root.PADinput.PAD1DOWN_DIRECT | root.PADinput.PAD1DOWN,
root.PADinput.PAD1LEFT_LS | root.PADinput.PAD1LEFT_DIRECT | root.PADinput.PAD1LEFT,
root.PADinput.PAD1RIGHT_LS | root.PADinput.PAD1RIGHT_DIRECT | root.PADinput.PAD1RIGHT,

@dendi2008

dendi2008 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Can you check if it's not rather just a matter of modifying PADcustomA in profiles/common/scriptinput.lua

root.PADinput.PAD1UP_LS | root.PADinput.PAD1UP_DIRECT,
root.PADinput.PAD1DOWN_LS | root.PADinput.PAD1DOWN_DIRECT,
root.PADinput.PAD1LEFT_LS | root.PADinput.PAD1LEFT_DIRECT,
root.PADinput.PAD1RIGHT_LS | root.PADinput.PAD1RIGHT_DIRECT,

to

root.PADinput.PAD1UP_LS | root.PADinput.PAD1UP_DIRECT | root.PADinput.PAD1UP,
root.PADinput.PAD1DOWN_LS | root.PADinput.PAD1DOWN_DIRECT | root.PADinput.PAD1DOWN,
root.PADinput.PAD1LEFT_LS | root.PADinput.PAD1LEFT_DIRECT | root.PADinput.PAD1LEFT,
root.PADinput.PAD1RIGHT_LS | root.PADinput.PAD1RIGHT_DIRECT | root.PADinput.PAD1RIGHT,

It will work. It works even without changing scriptinput.lua (just changing PADcustom to PAD1 in cpp), but right stick on gamepad will also be able to trigger, even during scrolling tips list. But right stick should trigger only when user scrolling text in selected Tip (Note text).

@KKhanhH

KKhanhH commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

I want to take a look at this a little bit more and see if it's an issue with a missing pad to kb mapping or if it's something we should actually be hard codong in our menu

@dendi2008

dendi2008 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

I want to take a look at this a little bit more and see if it's an issue with a missing pad to kb mapping or if it's something we should actually be hard codong in our menu

I also noticed, that even without any changes, if you will hold W/S(also arrows) key, it will trigger fast scrolling.

@dendi2008

dendi2008 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

I want to take a look at this a little bit more and see if it's an issue with a missing pad to kb mapping or if it's something we should actually be hard codong in our menu

Okay, I checked. It's an issue with a missing pad to kb mapping. You can scroll Note text with F/R. So, I guess, we should add something like this to scriptinput.lua:

    [16] = {SC._UP, SC._KP_8, SC._W},
    [17] = {SC._DOWN, SC._KP_2, SC._S},
    [18] = {SC._LEFT, SC._KP_4, SC._A},
    [19] = {SC._RIGHT, SC._KP_6, SC._D},

@dendi2008 dendi2008 force-pushed the CCLCC-Tips-keyboard-fix branch from ac2f884 to 984a80c Compare June 9, 2026 13:14
@KKhanhH

KKhanhH commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Oh I think I figured out the issue. Basically the mappings are all fine, it's just the implementation of UpdatePADHoldInput isn't correct. The arrow direct keys are supposed to only work when held, not single taps, and tipsmenu is supposed to use the repeat functions, so those are all fine, but since we aren't supposed to set InputButtonWentDown and only InputButtonIsDown, InputButtonRepeatDown doesn't work correctly. UpdatePADHoldInput isn't supposed to use WentDown at all and only use IsDown

@dendi2008 dendi2008 force-pushed the CCLCC-Tips-keyboard-fix branch from 984a80c to 8a4a952 Compare June 10, 2026 09:27
@dendi2008

Copy link
Copy Markdown
Contributor Author

Oh I think I figured out the issue. Basically the mappings are all fine, it's just the implementation of UpdatePADHoldInput isn't correct. The arrow direct keys are supposed to only work when held, not single taps, and tipsmenu is supposed to use the repeat functions, so those are all fine, but since we aren't supposed to set InputButtonWentDown and only InputButtonIsDown, InputButtonRepeatDown doesn't work correctly. UpdatePADHoldInput isn't supposed to use WentDown at all and only use IsDown

Done, if I understood you correctly.

@KKhanhH

KKhanhH commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Would probably need to keep track of previous frame's buttonisdown as a replacement for wentdown

@KKhanhH

KKhanhH commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Oh i just saw your commit, that should work

@dendi2008

Copy link
Copy Markdown
Contributor Author

Would probably need to keep track of previous frame's buttonisdown as a replacement for wentdown

This done by static uint32_t previousIsDown.

@Enorovan Enorovan merged commit 79582c6 into CommitteeOfZero:master Jun 10, 2026
8 checks passed
@dendi2008 dendi2008 deleted the CCLCC-Tips-keyboard-fix branch June 10, 2026 12:13
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

Successfully merging this pull request may close these issues.

Keyboard controls unresponsive in C;C LCC tips menu

3 participants