Author: lluis
Date: 2008-02-14 18:49:39 -0500 (Thu, 14 Feb 2008)
New Revision: 95712
Modified:
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/ChangeLog
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtendibleTextEditor.cs
Log:
* MonoDevelop.SourceEditor/ExtendibleTextEditor.cs: Bind MonoDevelop
shortcuts to editor actions.
Modified: trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/ChangeLog
2008-02-14 23:46:33 UTC (rev 95711)
+++ trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/ChangeLog
2008-02-14 23:49:39 UTC (rev 95712)
@@ -1,3 +1,8 @@
+2008-02-15 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * MonoDevelop.SourceEditor/ExtendibleTextEditor.cs: Bind MonoDevelop
+ shortcuts to editor actions.
+
2008-02-14 Mike Krüger <[EMAIL PROTECTED]>
* MonoDevelop.SourceEditor.addin.xml,
Modified:
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtendibleTextEditor.cs
===================================================================
---
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtendibleTextEditor.cs
2008-02-14 23:46:33 UTC (rev 95711)
+++
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtendibleTextEditor.cs
2008-02-14 23:49:39 UTC (rev 95712)
@@ -460,5 +460,112 @@
Caret.Offset = finalCaretOffset;
}
#endregion
+
+#region Key bindings
+
+ [CommandHandler
(MonoDevelop.Ide.Commands.TextEditorCommands.LineEnd)]
+ internal void OnLineEnd ()
+ {
+ SimulateKeyPress (Gdk.Key.End, Gdk.ModifierType.None);
+ }
+
+ [CommandHandler
(MonoDevelop.Ide.Commands.TextEditorCommands.LineStart)]
+ internal void OnLineStart ()
+ {
+ SimulateKeyPress (Gdk.Key.Home, Gdk.ModifierType.None);
+ }
+
+ [CommandHandler
(MonoDevelop.Ide.Commands.TextEditorCommands.DeleteLeftChar)]
+ internal void OnDeleteLeftChar ()
+ {
+ SimulateKeyPress (Gdk.Key.BackSpace,
Gdk.ModifierType.None);
+ }
+
+ [CommandHandler
(MonoDevelop.Ide.Commands.TextEditorCommands.DeleteRightChar)]
+ internal void OnDeleteRightChar ()
+ {
+ SimulateKeyPress (Gdk.Key.Delete,
Gdk.ModifierType.None);
+ }
+
+ [CommandHandler
(MonoDevelop.Ide.Commands.TextEditorCommands.CharLeft)]
+ internal void OnCharLeft ()
+ {
+ SimulateKeyPress (Gdk.Key.Left, Gdk.ModifierType.None);
+ }
+
+ [CommandHandler
(MonoDevelop.Ide.Commands.TextEditorCommands.CharRight)]
+ internal void OnCharRight ()
+ {
+ SimulateKeyPress (Gdk.Key.Right, Gdk.ModifierType.None);
+ }
+
+ [CommandHandler
(MonoDevelop.Ide.Commands.TextEditorCommands.LineUp)]
+ internal void OnLineUp ()
+ {
+ SimulateKeyPress (Gdk.Key.Up, Gdk.ModifierType.None);
+ }
+
+ [CommandHandler
(MonoDevelop.Ide.Commands.TextEditorCommands.LineDown)]
+ internal void OnLineDown ()
+ {
+ SimulateKeyPress (Gdk.Key.Down, Gdk.ModifierType.None);
+ }
+
+ [CommandHandler
(MonoDevelop.Ide.Commands.TextEditorCommands.DocumentStart)]
+ internal void OnDocumentStart ()
+ {
+ SimulateKeyPress (Gdk.Key.Home,
Gdk.ModifierType.ControlMask);
+ }
+
+ [CommandHandler
(MonoDevelop.Ide.Commands.TextEditorCommands.DocumentEnd)]
+ internal void OnDocumentEnd ()
+ {
+ SimulateKeyPress (Gdk.Key.End,
Gdk.ModifierType.ControlMask);
+ }
+
+ [CommandHandler
(MonoDevelop.Ide.Commands.TextEditorCommands.PageUp)]
+ internal void OnPageUp ()
+ {
+ SimulateKeyPress (Gdk.Key.Page_Up,
Gdk.ModifierType.None);
+ }
+
+ [CommandHandler
(MonoDevelop.Ide.Commands.TextEditorCommands.PageDown)]
+ internal void OnPageDown ()
+ {
+ SimulateKeyPress (Gdk.Key.Page_Down,
Gdk.ModifierType.None);
+ }
+
+ [CommandHandler
(MonoDevelop.Ide.Commands.TextEditorCommands.DeleteLine)]
+ internal void OnDeleteLine ()
+ {
+ SimulateKeyPress (Gdk.Key.d,
Gdk.ModifierType.ControlMask);
+ }
+
+ [CommandHandler
(MonoDevelop.Ide.Commands.TextEditorCommands.DeleteToLineEnd)]
+ internal void OnDeleteToLineEnd ()
+ {
+ SimulateKeyPress (Gdk.Key.D, Gdk.ModifierType.ShiftMask
| Gdk.ModifierType.ControlMask);
+ }
+
+ [CommandHandler
(MonoDevelop.Ide.Commands.TextEditorCommands.ScrollLineUp)]
+ internal void OnScrollLineUp ()
+ {
+ SimulateKeyPress (Gdk.Key.Up,
Gdk.ModifierType.ControlMask);
+ }
+
+ [CommandHandler
(MonoDevelop.Ide.Commands.TextEditorCommands.ScrollLineDown)]
+ internal void OnScrollLineDown ()
+ {
+ SimulateKeyPress (Gdk.Key.Down,
Gdk.ModifierType.ControlMask);
+ }
+
+ [CommandHandler
(MonoDevelop.Ide.Commands.TextEditorCommands.GotoMatchingBrace)]
+ internal void OnGotoMatchingBrace ()
+ {
+ SimulateKeyPress (Gdk.Key.b,
Gdk.ModifierType.ControlMask);
+ }
+
+#endregion
+
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches