docs » hs.mouse
Inspect/manipulate the position of the mouse pointer
This module is based primarily on code from the previous incarnation of Mjolnir by Steven Degutis.
This module uses ManyMouse by Ryan C. Gordon.
MANYMOUSE LICENSE:
Copyright (c) 2005-2012 Ryan C. Gordon and others.
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
-
Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
-
This notice may not be removed or altered from any source distribution.
Ryan C. Gordon [email protected]
- Functions - API calls offered directly by the extension
- absolutePosition
- count
- getButtons
- getCurrentScreen
- getRelativePosition
- names
- scrollDirection
- setRelativePosition
- trackingSpeed
Signature | hs.mouse.absolutePosition([point]) -> point |
---|---|
Type | Function |
Description | Get or set the absolute co-ordinates of the mouse pointer |
Parameters |
|
Returns |
|
Notes |
|
Signature | hs.mouse.count([includeInternal]) -> number |
---|---|
Type | Function |
Description | Gets the total number of mice connected to your system. |
Parameters |
|
Returns |
|
Notes |
|
Signature | hs.mouse.getButtons() -> table |
---|---|
Type | Function |
Description | Returns a table containing the current mouse buttons being pressed at this instant. |
Parameters |
|
Returns |
|
Notes |
|
Signature | hs.mouse.getCurrentScreen() -> screen or nil |
---|---|
Type | Function |
Description | Gets the screen the mouse pointer is on |
Parameters |
|
Returns |
|
Signature | hs.mouse.getRelativePosition() -> point or nil |
---|---|
Type | Function |
Description | Gets the co-ordinates of the mouse pointer, relative to the screen it is on |
Parameters |
|
Returns |
|
Notes |
|
Signature | hs.mouse.names() -> table |
---|---|
Type | Function |
Description | Gets the names of any mice connected to the system. |
Parameters |
|
Returns |
|
Notes |
|
Signature | hs.mouse.scrollDirection() -> string |
---|---|
Type | Function |
Description | Gets the system-wide direction of scolling |
Parameters |
|
Returns |
|
Signature | hs.mouse.setRelativePosition(point[, screen]) |
---|---|
Type | Function |
Description | Sets the co-ordinates of the mouse pointer, relative to a screen |
Parameters |
|
Returns |
|
Signature | hs.mouse.trackingSpeed([speed]) -> number |
---|---|
Type | Function |
Description | Gets/Sets the current system mouse tracking speed setting |
Parameters |
|
Returns |
|
Notes |
|