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

Change: Use key names instead of characters in hotkey.cfg #8291

Merged
merged 1 commit into from Sep 1, 2020

Conversation

ldpl
Copy link
Contributor

@ldpl ldpl commented Aug 10, 2020

Because using .cfg special characters as values is a terrible idea:

  • = doesn't work as a single hotkey
  • , never works at all, it's a hotkey list separator
  • + and " would've never worked as well but were strategically avoided even though there are - and '
  • some other chars like \ only work by the miracle of a weird ini parser
  • COMMA and "=" only work once before it rewrites config with broken variants
  • there is BACKQUOTE
  • there is NUM_MINUS as well as - even though they're the same character (because they are supposed to be key codes, not characters).

So, IMO, the only way out of this mess is to use key names everywhere. Unfortunately, characters will also have to be kept, at least for a while, to convert old configs.

@LordAro LordAro merged commit ab420d8 into OpenTTD:master Sep 1, 2020
@ldpl ldpl deleted the hotkey-names branch September 4, 2020 19:28
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.

None yet

2 participants