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

amend typos in keys.lua #543

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

amend typos in keys.lua #543

wants to merge 2 commits into from

Conversation

hugeblank
Copy link

Skimming through the CC API for an emulator project and found this bug rendering the game "literally unplayable". I decided to take this game-breaking issue into my own hands and repair it. You're welcome CC.

In other words this is the worst reason to receive a contributor tag.

The most important commit that CC has ever seen.
@@ -53,6 +53,7 @@ for nKey, sKey in pairs( tKeys ) do
keys[sKey] = nKey
end
keys["return"] = keys.enter
keys.scollLock = keys.scrollLock
Copy link
Contributor

@Lupus590 Lupus590 May 8, 2018

Choose a reason for hiding this comment

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

You might as well change this to keys["scrollLock"] to be consistent with the line above.

Copy link
Contributor

@SquidDev SquidDev May 8, 2018

Choose a reason for hiding this comment

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

I believe it's only ["return"] because that is a Lua keyword, and so keys.return is invalid syntax.

@@ -53,6 +53,7 @@ for nKey, sKey in pairs( tKeys ) do
keys[sKey] = nKey
end
keys["return"] = keys.enter
keys.scollLock = keys.scrollLock
Copy link

@KnightMiner KnightMiner May 9, 2018

Choose a reason for hiding this comment

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

Probably should add a comment here explaining why the old name is kept for after this is merged, something like "typo kept to avoid a breaking change"

Copy link
Author

Choose a reason for hiding this comment

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

I thought about it, I wasn’t sure if it was worth commenting though. I’ll add it when I get the chance.

Copy link
Author

Choose a reason for hiding this comment

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

@KnightMiner I should mention I did this in the most recent commit.

- fixed circumflex typo: you can now cîrcûmflêx on all your friends
- added comment making it clearer that the following lines are intended for backwards compatibility.
@hugeblank
Copy link
Author

Found another typo, you can now cîrcûm FLÊX (correctly) on all your friends.

@hugeblank hugeblank changed the title amend typo in keys.lua amend typos in keys.lua May 21, 2018
ccserver pushed a commit to ccserver/ComputerCraft that referenced this pull request Sep 16, 2019
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.

4 participants