Android Studio undo (Ctrl-Z) / redo (Ctrl-Y) not working

ban-geoengineering picture ban-geoengineering · Aug 31, 2015 · Viewed 57.5k times · Source

I've just moved from Eclipse to Android Studio and am finding really weird behaviour when I try to do Ctrl+Z / Ctrl+Y to undo/redo code changes.

It hard to describe what happens exactly, but the end result is that I usually end up just losing my code and having to type it back in from memory...

The 'undo' and 'redo' buttons in the IDE do seem to work fine, so maybe something is wrong with my shortcut keys (which would be surprising as I should just have a standard installation / setup).

Can anyone advise what to do, so Ctrl and Z / Ctrl+Y will work in the expected manner.

Answer

ban-geoengineering picture ban-geoengineering · Aug 31, 2015

With the help of this answer, I have worked it out...

  1. Go into Settings (Ctrl+Alt + S)
  2. Type Redo in the search box.
  3. Double-click on the Redo result
  4. Select Add Keyboard Shortcut
  5. Press Ctrl+Y
  6. Click OK
  7. Click OK