define undo/redo key bindings in textView.js
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/editorCommands.js b/bundles/org.eclipse.orion.client.core/web/orion/editorCommands.js
index be4bd2c..cf1827d 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/editorCommands.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/editorCommands.js
@@ -419,24 +419,20 @@
 				name: messages['Undo'],
 				id: "orion.undo", //$NON-NLS-0$
 				callback: function(data) {
-					data.items.getTextView().invokeAction("undo");
+					data.items.getTextView().invokeAction("undo"); //$NON-NLS-0$
 				}});
-			editor.getTextView().setKeyBinding(new mKeyBinding.KeyBinding('z', true), "undo"); //$NON-NLS-1$ //$NON-NLS-0$
 			editor.getTextView().setAction("undo", function() { //$NON-NLS-0$
 				undoStack.undo();
 				return true;
 			}, undoCommand);
 			this.commandService.addCommand(undoCommand);
 			
-			var isMac = navigator.platform.indexOf("Mac") !== -1; //$NON-NLS-0$
-			var binding = isMac ? new mKeyBinding.KeyBinding('z', true, true) : new mKeyBinding.KeyBinding('y', true); //$NON-NLS-1$ //$NON-NLS-0$
 			var redoCommand = new mCommands.Command({
 				name: messages['Redo'],
 				id: "orion.redo", //$NON-NLS-0$
 				callback: function(data) {
 					data.items.getTextView().invokeAction("redo"); //$NON-NLS-0$
 				}});
-			editor.getTextView().setKeyBinding(binding, "redo"); //$NON-NLS-0$
 			editor.getTextView().setAction("redo", function() { //$NON-NLS-0$
 				undoStack.redo();
 				return true;
@@ -444,8 +440,8 @@
 	
 			this.commandService.addCommand(redoCommand);
 	
-			this.commandService.registerCommandContribution(this.toolbarId, "orion.undo", 400, null, true, new mCommands.CommandKeyBinding('z', true)); //$NON-NLS-1$ //$NON-NLS-0$
-			this.commandService.registerCommandContribution(this.toolbarId, "orion.redo", 401, null, true, binding); //$NON-NLS-0$
+			this.commandService.registerCommandContribution(this.toolbarId, "orion.undo", 400, null, true, editor.getTextView().getKeyBindings("undo")[0]); //$NON-NLS-1$ //$NON-NLS-0$
+			this.commandService.registerCommandContribution(this.toolbarId, "orion.redo", 401, null, true, editor.getTextView().getKeyBindings("redo")[0]); //$NON-NLS-1$ //$NON-NLS-0$
 
 			return undoStack;
 		}
diff --git a/bundles/org.eclipse.orion.client.editor/web/examples/textview/demoSetup.js b/bundles/org.eclipse.orion.client.editor/web/examples/textview/demoSetup.js
index 86ba86a..274fde5 100644
--- a/bundles/org.eclipse.orion.client.editor/web/examples/textview/demoSetup.js
+++ b/bundles/org.eclipse.orion.client.editor/web/examples/textview/demoSetup.js
@@ -96,12 +96,10 @@
 		/* Undo stack */

 		var undoStack = exports.undoStack = new mUndoStack.UndoStack(view, 200);

 		exports.textDND = new mTextDND.TextDND(view, undoStack);

-		view.setKeyBinding(new mKeyBinding.KeyBinding('z', true), "undo"); //$NON-NLS-1$ //$NON-NLS-0$

 		view.setAction("undo", function() { //$NON-NLS-0$

 			undoStack.undo();

 			return true;

 		});

-		view.setKeyBinding(util.isMac ? new mKeyBinding.KeyBinding('z', true, true) : new mKeyBinding.KeyBinding('y', true), "redo"); //$NON-NLS-2$ //$NON-NLS-1$//$NON-NLS-0$

 		view.setAction("redo", function() { //$NON-NLS-0$

 			undoStack.redo();

 			return true;

diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/editorFeatures.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/editorFeatures.js
index 727a874..dfa10ac 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/editorFeatures.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/editorFeatures.js
@@ -22,13 +22,11 @@
 		createUndoStack: function(editor) {
 			var textView = editor.getTextView();
 			var undoStack =  new mUndoStack.UndoStack(textView, 200);
-			textView.setKeyBinding(new mKeyBinding.KeyBinding('z', true), "undo"); //$NON-NLS-1$ //$NON-NLS-0$
 			textView.setAction("undo", function() { //$NON-NLS-0$
 				undoStack.undo();
 				return true;
 			}, {name: messages.undo});
 			
-			textView.setKeyBinding(util.isMac ? new mKeyBinding.KeyBinding('z', true, true) : new mKeyBinding.KeyBinding('y', true), "redo"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
 			textView.setAction("redo", function() { //$NON-NLS-0$
 				undoStack.redo();
 				return true;
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/textView.js b/bundles/org.eclipse.orion.client.editor/web/orion/textview/textView.js
index 9fbedd6..f3a43de 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/textView.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/textview/textView.js
@@ -4090,6 +4090,14 @@
 				bindings.push({actionID: "selectTextStart",		keyBinding: new KeyBinding(36, true, true), predefined: true}); //$NON-NLS-0$
 				bindings.push({actionID: "selectTextEnd",		keyBinding: new KeyBinding(35, true, true), predefined: true}); //$NON-NLS-0$
 			}
+			
+			//Undo stack
+			bindings.push({actionID: "undo", keyBinding: new mKeyBinding.KeyBinding('z', true), predefined: true}); //$NON-NLS-1$ //$NON-NLS-0$
+			if (util.isMac) {
+				bindings.push({actionID: "redo", keyBinding: new mKeyBinding.KeyBinding('z', true, true), predefined: true}); //$NON-NLS-1$ //$NON-NLS-0$
+			} else {
+				bindings.push({actionID: "redo", keyBinding: new mKeyBinding.KeyBinding('y', true), predefined: true}); //$NON-NLS-1$ //$NON-NLS-0$
+			}
 
 			//Misc
 			bindings.push({actionID: "deletePrevious",		keyBinding: new KeyBinding(8), predefined: true}); //$NON-NLS-0$