diff --git a/mercurial/crecord.py b/mercurial/crecord.py
index 7cc913396f8cdcf65d756f9022b437e608ebbae9_bWVyY3VyaWFsL2NyZWNvcmQucHk=..be0f77fd274dfeaf47a2104b178039894532c425_bWVyY3VyaWFsL2NyZWNvcmQucHk= 100644
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -59,6 +59,7 @@
 
 try:
     import curses
+    import curses.ascii
 
     curses.error
 except ImportError:
@@ -1938,7 +1939,7 @@
             self.helpwindow()
             self.stdscr.clear()
             self.stdscr.refresh()
-        elif curses.unctrl(keypressed) in ["^L"]:
+        elif keypressed in [curses.ascii.ctrl("L")]:
             # scroll the current line to the top of the screen, and redraw
             # everything
             self.scrolllines(self.selecteditemstartline)