I need help. When typing my code in cs50 ide, I've realized that typing the character y on my keyboard tend to delete a block of code from my hard written code

Pls help

  • Have you refreshed and restarted your IDE? Did you copy any of the code before pressing Y? Have you refreshed and restarted your computer? Feb 8 '17 at 23:09

I encountered this issue in my classroom today. Restarting the IDE itself did not solve the problem. However, we were able to fix it by applying the following steps:

  • Running update50
  • Closing the affected file
  • Reopening said file

I wish I had an explanation as to why this worked, but I'm happy to say it did. If there's a more thorough explanation for this, I'd love to know more precisely what is happening.


Simply click File in the upper-hand corner of your CS50 IDE, and then click Show File Revision History. You'll see a slider above your file, which you can slide back and forth to see your file revision history. When you reach a part of the revision history that you'd like to revert back to, simply click Revert. You can also click the play button to the left of the slider to see your progress throughout the file. This will bring back any code you deleted.

enter image description here

As for your y character, I'm not exactly sure why it deleted a block of code, but it could be a result of not restarting your IDE or not restarting your computer.

If you still have questions/issues, comment below.

  • That helped. Thanks
    – Hubert
    Feb 10 '17 at 4:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .