Skip to content

Conversation

XuYicong
Copy link
Member

@XuYicong XuYicong commented Jun 7, 2024

Can now map more keys on different types of keyboards, including number keypad and function keys up to F20.

Fix controller direction pad issue when setting the key in the keymap editor, where the element has to be unfocused before a D-Pad key is released to be mapped.

Also, testing on an Xbox controller shows the D-Pad up and down key are reversed. They're now swapped back.

截屏2024-06-07 15 01 04

Copy link
Member

@Depal1 Depal1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got to test everything but

gcCode[GCKeyCode.international3.rawValue] = "¥" // IntlYen
        gcCode[GCKeyCode.international1.rawValue] = "ろ" // IntlRo
        gcCode[GCKeyCode.nonUSBackslash.rawValue] = "§" // 100
        gcCode[GCKeyCode.nonUSPound.rawValue] = "Keypad ,"
        gcCode[GCKeyCode.LANG2.rawValue] = "英数 한자" // Eisu(alphanumeric) Hanja
        gcCode[GCKeyCode.LANG1.rawValue] = "かな 한/영" // Kana Korean/English

They should be alright though.

Copy link
Member

@TheMoonThatRises TheMoonThatRises left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the abbreviations are inconsistant (such as Delete vs Del). Also might be worth abbreviating other commonly abbreviated words such as Context to Ctx and Forward to Fwd. @Depal1?

Copy link
Member

@Depal1 Depal1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the other abbreviations @TheMoonThatRises suggested, but I don't think it is necessary to abbreviate 'page'.

@XuYicong
Copy link
Member Author

I was considering a way of decreasing the file length. There are three dicts: mapVirtualToName, mapGCtoName and mapVirtualToGc. Actually mapVirtualToName can be generated from the other two dicts during class initialization. In that way we can both shorten the file length and mitigate the risk of data inconsistency when editing these dicts. Do you think it's a good idea?

@Depal1
Copy link
Member

Depal1 commented Jun 28, 2024

I was considering a way of decreasing the file length. There are three dicts: mapVirtualToName, mapGCtoName and mapVirtualToGc. Actually mapVirtualToName can be generated from the other two dicts during class initialization. In that way we can both shorten the file length and mitigate the risk of data inconsistency when editing these dicts. Do you think it's a good idea?

By all means, it would be a better approach for the maintainability of the code.

@TheMoonThatRises TheMoonThatRises merged commit 4ab81c5 into PlayCover:master Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants