create a new page, using OOoBasic/Generic/InputInterception as a template.
Front page
Search
掲示板
Reload
Help
Browse Log
掲示板の使い方
OOo 掲示板3
OOo 掲示板2
OOo 掲示板
掲示板
雑談掲示板
New
List of pages
Recent changes
Backup
簡単ヘルプ
整形ルール
Start:
*インプットインターセプション [#sab8e02a]
ユーザーのキーボード入力およびマウス入力を捕捉するサービ...
#contents
com.sun.star.awt.XUserInputInterception インターフェース...
**キーハンドラ [#l0062677]
キーリスナーには com.sun.star.awt.XKeyHandler を利用しま...
Sub inputinterception_1
oDoc = ThisComponent
oController = oDoc.getCurrentController()
oKeyHandler = CreateUnoListener( _
"KeyHandler_","com.sun.star.awt.XKeyHandler")
oController.addKeyHandler(oKeyHandler)
End Sub
Function KeyHandler_keyPressed( oEv )
If oEv.KeyChar = "a" Then
KeyHandler_keyPressed = True
Else
KeyHandler_keyPressed = False
End If
End Function
Function KeyHandler_keyReleased( oEv )
KeyHandler_keyReleased = False
End Function
Sub KeyHandler_disposing( oEv )
End Sub
keyPressed メソッドおよび keyReleased の返り値が True の...
上記の例では "a" キーを押すときキー操作が無効化されます。...
**マウスハンドラ [#af845421]
Sub inputinterception_2
oDoc = ThisComponent
oController = oDoc.getCurrentController()
oMouseHandler = CreateUnoListener( _
"MouseClickHandler_","com.sun.star.awt.XMouseClickHa...
oController.addMouseClickHandler(oMouseHandler)
End Sub
Function MouseClickHandler_mousePressed( oEv ) As Boolean
If oEv.Buttons = com.sun.star.awt.MouseButton.RIGHT Then
MouseHandler_mousePressed = False
Else
MouseHandler_mousePressed = True
End If
End Function
Function MouseClickHandler_mouseReleased( oEv ) As Boolean
MouseClickHandler_mouseReleased = False
End Function
Sub MouseClickHandler_disposing( oEv )
End Sub
End:
*インプットインターセプション [#sab8e02a]
ユーザーのキーボード入力およびマウス入力を捕捉するサービ...
#contents
com.sun.star.awt.XUserInputInterception インターフェース...
**キーハンドラ [#l0062677]
キーリスナーには com.sun.star.awt.XKeyHandler を利用しま...
Sub inputinterception_1
oDoc = ThisComponent
oController = oDoc.getCurrentController()
oKeyHandler = CreateUnoListener( _
"KeyHandler_","com.sun.star.awt.XKeyHandler")
oController.addKeyHandler(oKeyHandler)
End Sub
Function KeyHandler_keyPressed( oEv )
If oEv.KeyChar = "a" Then
KeyHandler_keyPressed = True
Else
KeyHandler_keyPressed = False
End If
End Function
Function KeyHandler_keyReleased( oEv )
KeyHandler_keyReleased = False
End Function
Sub KeyHandler_disposing( oEv )
End Sub
keyPressed メソッドおよび keyReleased の返り値が True の...
上記の例では "a" キーを押すときキー操作が無効化されます。...
**マウスハンドラ [#af845421]
Sub inputinterception_2
oDoc = ThisComponent
oController = oDoc.getCurrentController()
oMouseHandler = CreateUnoListener( _
"MouseClickHandler_","com.sun.star.awt.XMouseClickHa...
oController.addMouseClickHandler(oMouseHandler)
End Sub
Function MouseClickHandler_mousePressed( oEv ) As Boolean
If oEv.Buttons = com.sun.star.awt.MouseButton.RIGHT Then
MouseHandler_mousePressed = False
Else
MouseHandler_mousePressed = True
End If
End Function
Function MouseClickHandler_mouseReleased( oEv ) As Boolean
MouseClickHandler_mouseReleased = False
End Function
Sub MouseClickHandler_disposing( oEv )
End Sub
Page: