-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1509 from benoit-pierre/oslayer_reorg
`osslayer` reorg
- Loading branch information
Showing
34 changed files
with
396 additions
and
492 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
.github/workflows/ci/skiplist_os_Windows.txt | ||
.github/workflows/ci/skiplist_os_macOS.txt | ||
osx/* | ||
plover/oslayer/log_osx.py | ||
plover/oslayer/osxkeyboardcontrol.py | ||
plover/oslayer/osxkeyboardlayout.py | ||
plover/oslayer/winkeyboardcontrol.py | ||
plover/oslayer/winkeyboardlayout.py | ||
plover/oslayer/osx/* | ||
plover/oslayer/windows/* | ||
windows/* | ||
{EOF} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
.github/workflows/ci/skiplist_os_Linux.txt | ||
.github/workflows/ci/skiplist_os_Windows.txt | ||
linux/* | ||
plover/oslayer/log_dbus.py | ||
plover/oslayer/winkeyboardcontrol.py | ||
plover/oslayer/winkeyboardlayout.py | ||
plover/oslayer/xkeyboardcontrol.py | ||
plover/oslayer/xwmctrl.py | ||
plover/oslayer/linux/* | ||
plover/oslayer/windows/* | ||
windows/* | ||
{EOF} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class Capture: | ||
|
||
"""Keyboard capture interface.""" | ||
|
||
# Callbacks for keyboard press/release events. | ||
key_down = lambda key: None | ||
key_up = lambda key: None | ||
|
||
def start(self): | ||
"""Start capturing key events.""" | ||
raise NotImplementedError() | ||
|
||
def cancel(self): | ||
"""Stop capturing key events.""" | ||
raise NotImplementedError() | ||
|
||
def suppress(self, suppressed_keys=()): | ||
"""Setup suppression.""" | ||
raise NotImplementedError() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import locale | ||
import os | ||
|
||
|
||
# Note: highest priority first. | ||
LANG_ENV_VARS = ('LC_ALL', 'LC_MESSAGES', 'LANG') | ||
|
||
def get_system_language(): | ||
try: | ||
return next(filter(None, map(os.environ.get, LANG_ENV_VARS))) | ||
except StopIteration: | ||
return locale.getdefaultlocale()[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .keyboardcontrol_x11 import KeyboardCapture, KeyboardEmulation # pylint: disable=unused-import |
Oops, something went wrong.