Jed Parsons wrote:
> My question is how to map the ENTER or RETURN key to
> sameElementAfter[implicitElement].  I'd like to just hit ENTER where
> currently I have to type Ctrl-ENTER.  I tried a customize.xxe, but must
> be doing something wrong.
> 
> This was the default behavior in v.2, and has gone away (for me, at
> least) in v.3.
> 
> Perhaps related, the #text element is always shown in my element path,
> whereas before I don't believe this was the case.

Let's assume you write DocBook documents. If this not the case, do not
hesitate to send us another email.

If we open a DocBook document and use menu item "Help|Mouse and Keyboard
bindings", we see that:

* The Enter keystroke is currently bound to command
"docb.splitOrInsertNewLine".

* The Ctrl-Enter is currently bound to "docb.addSame" with parameter
"After".

I've attached to this email a customization of the DocBook configuration
which swaps these bindings. I don't know if this is what you want but,
this way, you have at least a starting point.

---
<?xml version='1.0' encoding='ISO-8859-1'?>
<configuration name="DocBook"
  xmlns="http://www.xmlmind.com/xmleditor/schema/configuration";
  xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration";>

  <include location="xxe-config:docbook/docbook.xxe"/>

  <binding>
    <keyPressed code="ENTER" />
    <command name="docb.addSame" parameter="After" />
  </binding>

  <binding>
    <keyPressed code="ENTER" modifiers="shift" />
    <command name="docb.addSame" parameter="Before" />
  </binding>

  <!-- "mod" is Command on the Mac and Ctrl on other platforms -->

  <binding>
    <keyPressed code="ENTER" modifiers="mod" />
    <command name="docb.splitOrInsertNewLine" />
  </binding>

</configuration>
---

In order to use mydocbook.xxe, simply copy this file to
<XXE_user_preferences_dir>/addon/ (to *addon/* and not directly under
XXE_user_preferences_dir>/) and then restart XXE.

<XXE_user_preferences_dir> is:

* $HOME/.xxe/ on Unix/Linux/MacOSX,

* %SystemDrive%\Documents and Settings\%USERNAME%\Application
Data\XMLmind\XMLeditor\ on Windows 2000/XP,

* %SystemDrive%\winnt\Profiles\%USERNAME%\Application
Data\XMLmind\XMLeditor\ on Windows NT.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mydocbook.xxe
Type: text/xml
Size: 715 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20060126/e154dc6a/attachment.xml
 

Reply via email to