Oberon Community Platform Forum
December 07, 2019, 07:25:28 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: HotKeys and Macros  (Read 4924 times)
Philipp
Newbie
*
Posts: 3


« on: August 19, 2009, 01:18:31 PM »

System: WinAos
SVN Revision: 2465

Changed files:
  • source/HotKeys.XML
  • source/Macros.XML

I added some hot keys to the HotKeys.XML file for opening the WMSearchTool, Closing Windows and mimic the predefined style buttons of the WMTextTool.

I now realised that there is also some redundancy with the WMTextStyleTool and the DefaultTextStyles.XML.

Additionally I added some comments to the Macro.XML file, added a macro for printing a boolean value and made the trigger key the paragraph, as Insert is not present anymore on all keyboards nowadays.

I don't request that all these changes get added, but they should be rather considered as a suggestion.

In the zip are the changed files. The .diff file contains the output of the svn diff command.


I inline the diff for quick review of the changes (for privacy reasons (emails adresses) the second part of the patch only can be applied with some fuzz):
Code:
Index: source/HotKeys.XML
===================================================================
--- source/HotKeys.XML (Revision 2465)
+++ source/HotKeys.XML (Working Copy)
@@ -74,6 +74,7 @@
  <!-- Example: Control window that has keyboard focus -->
  <HotKey name="Toggle Fullscreen" keys="ALT+RETURN" command="WMNavigate.ToggleFullscreen"/>
  <HotKey name="Close Window" keys="ALT+F4" command="WMNavigate.CloseWindow"/>
+ <HotKey name="Close Window" keys="META+W" command="WMNavigate.CloseWindow"/><!-- Mac close window shortcut -->
 
  <!-- Example: Switch keyboard focus to previous/next window -->
  <HotKey name="Open Windows Navigation" keys="CTRL+ALT+UP" command="WMNavigate.Open -vs 6 0 0 Navigation:TaskList "/>
@@ -86,9 +87,19 @@
 
  <!-- Example: Apply text style to currently selected text -->
  <HotKey name="Bold" keys="SHIFT+DELETE" command="WMTextTool.SetFontStyle Bold"/>
+ <!-- Text styles from the "Text Style" (TS) window -->
+ <HotKey name="TS:Bold" keys="META+SHIFT+B" command="WMTextTool.SetFontStyle Bold;WMTextTool.SetFontColor FFH"/>
+ <HotKey name="TS:Lock" keys="META+SHIFT+L" command="WMTextTool.SetFontStyle;WMTextTool.SetFontColor FF00FFFFH"/>
+ <HotKey name="TS:Comment" keys="META+SHIFT+C" command="WMTextTool.SetFontStyle;WMTextTool.SetFontColor 808080FFH"/>
+ <HotKey name="TS:Debug" keys="META+SHIFT+D" command="WMTextTool.SetFontStyle;WMTextTool.SetFontColor FFFFH"/>
+ <HotKey name="TS:Stupid" keys="META+SHIFT+S" command="WMTextTool.SetFontStyle;WMTextTool.SetFontColor FF0000FFH"/>
+ <HotKey name="TS:Assert" keys="META+SHIFT+A" command="WMTextTool.SetFontStyle Bold;WMTextTool.SetFontColor FFFFH"/>
+ <HotKey name="TS:Normal" keys="META+SHIFT+N" command="WMTextTool.SetFontStyle;WMTextTool.SetFontColor FFH"/>
 
  <!-- Example: Misc -->
  <HotKey name="Clear LogWindow" keys="META+CTRL+O" command="HotKeysCommands.ClearLog"/>
+ <HotKey name="Search Files" keys="META+SHIFT+F" command="WMSearchTool.Open"/>
+ <HotKey name="Search Files" keys="ALT+SHIFT+F" command="WMSearchTool.Open"/>
 
  <!-- Example: Simulate mouse wheel by keys -->
  <HotKey name="WHEEL UP" keys="CTRL+UP" command="HotKeysCommands.SimulateMouse MouseWheel -3"/>
Index: source/Macros.XML
===================================================================
--- source/Macros.XML (Revision 2465)
+++ source/Macros.XML (Working Copy)
@@ -13,7 +13,8 @@
  The specified key cannot be used for other purposes!
  Tips: Paragraph key (60)
  -->
- <MacroKey keysym="FF63"/>
+ <!--MacroKey keysym="FF63"/--><!-- Insert key, not present on all keyboards! -->
+ <MacroKey keysym="A7"/><!-- Paragraph key -->
 
  <!-- Mail -->
 
@@ -131,6 +132,9 @@
  <Macro key="ol">
  <String>KernelLog.Ln; </String>
  </Macro>
+ <Macro key="ob">
+ <String>KernelLog.Boolean(</String><Arg nr="0"/><String>); </String>
+ </Macro>
  <!-- Greek -->
  <Macro key="alpha"><String>α</String></Macro>
  <Macro key="beta"><String>β</String></Macro>

* HotKeys-Macro.zip (3.21 KB - downloaded 471 times.)
* HotKeys-Macro-patch-source.diff (2.87 KB - downloaded 457 times.)
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!