diff --git a/IPython/html/tests/notebook/arrow_keys.js b/IPython/html/tests/notebook/arrow_keys.js
index 0fa9dff..86c00a5 100644
--- a/IPython/html/tests/notebook/arrow_keys.js
+++ b/IPython/html/tests/notebook/arrow_keys.js
@@ -5,9 +5,9 @@ casper.notebook_test(function () {
var result = this.evaluate(function() {
IPython.notebook.command_mode();
pos0 = IPython.notebook.get_selected_index();
- IPython.utils.press(IPython.keycodes.b)
+ IPython.utils.press(IPython.keyboard.keycodes.b)
pos1 = IPython.notebook.get_selected_index();
- IPython.utils.press(IPython.keycodes.b)
+ IPython.utils.press(IPython.keyboard.keycodes.b)
pos2 = IPython.notebook.get_selected_index();
// Simulate the "up arrow" and "down arrow" keys.
IPython.utils.press_up();
diff --git a/IPython/html/tests/notebook/merge_cells.js b/IPython/html/tests/notebook/merge_cells.js
index 1ae939c..a7a681c 100644
--- a/IPython/html/tests/notebook/merge_cells.js
+++ b/IPython/html/tests/notebook/merge_cells.js
@@ -9,7 +9,7 @@ casper.notebook_test(function() {
var cell_one = IPython.notebook.get_selected_cell();
cell_one.set_text('a = 5');
- IPython.utils.press(IPython.keycodes.b)
+ IPython.utils.press(IPython.keyboard.keycodes.b)
var cell_two = IPython.notebook.get_selected_cell();
cell_two.set_text('print(a)');
};