Das folgende Beispiel, in einem Writer-Dokument gespeichert, setzt Strg+F10 => "Lösche bis Ende des Satzes".
Benötigte Parameter sind hier dokumentiert:
"Eingebaute .unoURLs":
http://www.openoffice.org/files/documents/25/2570/commandsReference.html
Das KeyEvent:
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/KeyEvent.html
...beinhaltet das InputEvent mit Modifiers (default = 0):
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/KeyModifier.html
... und enthält einen dieser KeyCodes (default=0):
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/Key.html
...sowie eine KeyFunction (default=0):
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/KeyFunction.html
... sowie ein Zeichen, das ausgegeben werden kann (default="")
Mit den beiden letzten kann ich irgendwie nix anfangen. Wenn das mal einer geduldig austesten könnte, ... Das Beispiel verwendet sie nicht.

Sub set_uno_DelToEndOfSentence()
'on error resume next
Dim oSM, sURL$ ,oEv as new com.sun.star.awt.KeyEvent
        oSM =  thiscomponent.getUIconfigurationmanager.shortcutmanager
        REM URL to call
REM http://www.openoffice.org/files/documents/25/2570/commandsReference.html
        REM or a script-url "vnd.sun.star.script:....."
        sURL = ".uno:DelToEndOfSentence"
        REM modifier(s) on x86-PCs are SHIFT=Shift key, MOD1=Ctrl key, MOD2=Alt 
key
        with com.sun.star.awt.KeyModifier
                oEv.Modifiers = .SHIFT + .MOD1
        end with
        REM one key code
        oEv.KeyCode = com.sun.star.awt.Key.F10
        REM other options:
        'oEv.KeyFunc = com.sun.star.awt.KeyFunction.?????
        'oEv.KeyChar =  "ß" '< some char to be printed
        oSM.setKeyEvent(oEv,sURL)
End Sub
Sub remove_uno_DelToEndOfSentence()
REM use the same settings as in Sub set_uno_DelToEndOfSentence
Dim oSM ,oEv as new com.sun.star.awt.KeyEvent
        oSM =  thiscomponent.getUIconfigurationmanager.shortcutmanager
        REM modifier(s) on x86-PCs MOD1=Ctrl, MOD2=Alt
        with com.sun.star.awt.KeyModifier
                oEv.Modifiers = .SHIFT + .MOD1
        end with
        REM one key code
        oEv.KeyCode = com.sun.star.awt.Key.F10
        REM other options:
        'oEv.KeyFunc = com.sun.star.awt.KeyFunction.?????
        'oEv.KeyChar =  "ß" '< some char to be printed
   oSM.removeKeyEvent(oEv)
end sub

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Antwort per Email an