Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/pynput/keyboard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import itertools

from pynput._util import backend, Events
from .._util import backend, Events


backend = backend(__name__)
Expand Down
6 changes: 3 additions & 3 deletions lib/pynput/keyboard/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

import six

from pynput._util import AbstractListener, prefix
from pynput import _logger
from .._util import AbstractListener, prefix
from .. import _logger


class KeyCode(object):
Expand Down Expand Up @@ -728,7 +728,7 @@ def canonical(self, key):
:return: a key
:rtype: Key or KeyCode
"""
from pynput.keyboard import Key, KeyCode, _NORMAL_MODIFIERS
from . import Key, KeyCode, _NORMAL_MODIFIERS
if isinstance(key, KeyCode) and key.char is not None:
return KeyCode.from_char(key.char.lower())
elif isinstance(key, Key) and key.value in _NORMAL_MODIFIERS:
Expand Down
2 changes: 1 addition & 1 deletion lib/pynput/keyboard/_darwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

import Quartz

from pynput._util.darwin import (
from .._util.darwin import (
get_unicode_to_keycode_map,
keycode_context,
ListenerMixin)
Expand Down
4 changes: 2 additions & 2 deletions lib/pynput/keyboard/_uinput.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@

from evdev.events import KeyEvent

from pynput._util import xorg_keysyms
from pynput._util.uinput import ListenerMixin
from .._util import xorg_keysyms
from .._util.uinput import ListenerMixin
from . import _base


Expand Down
6 changes: 3 additions & 3 deletions lib/pynput/keyboard/_win32.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@

from ctypes import wintypes

import pynput._util.win32_vks as VK
from .._util import win32_vks as VK

from pynput._util import AbstractListener
from pynput._util.win32 import (
from .._util import AbstractListener
from .._util.win32 import (
INPUT,
INPUT_union,
KEYBDINPUT,
Expand Down
8 changes: 4 additions & 4 deletions lib/pynput/keyboard/_xorg.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

# pylint: disable=W0611
try:
import pynput._util.xorg
from .._util import xorg
except Exception as e:
raise ImportError('failed to acquire X connection: {}'.format(str(e)), e)
# pylint: enable=W0611
Expand All @@ -42,8 +42,8 @@
import Xlib.protocol
import Xlib.keysymdef.xkb

from pynput._util import NotifierMixin
from pynput._util.xorg import (
from .._util import NotifierMixin
from .._util.xorg import (
alt_mask,
alt_gr_mask,
char_to_keysym,
Expand All @@ -54,7 +54,7 @@
numlock_mask,
shift_to_index,
symbol_to_keysym)
from pynput._util.xorg_keysyms import (
from .._util.xorg_keysyms import (
CHARS,
DEAD_KEYS,
KEYPAD_KEYS,
Expand Down
2 changes: 1 addition & 1 deletion lib/pynput/mouse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# pylint: disable=C0103
# Button, Controller and Listener are not constants

from pynput._util import backend, Events
from .._util import backend, Events


backend = backend(__name__)
Expand Down
4 changes: 2 additions & 2 deletions lib/pynput/mouse/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

import enum

from pynput._util import AbstractListener, prefix
from pynput import _logger
from .._util import AbstractListener, prefix
from .. import _logger


class Button(enum.Enum):
Expand Down
2 changes: 1 addition & 1 deletion lib/pynput/mouse/_darwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

from AppKit import NSEvent

from pynput._util.darwin import (
from .._util.darwin import (
ListenerMixin)
from . import _base

Expand Down
4 changes: 2 additions & 2 deletions lib/pynput/mouse/_win32.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
windll,
wintypes)

from pynput._util import NotifierMixin
from pynput._util.win32 import (
from .._util import NotifierMixin
from .._util.win32 import (
INPUT,
INPUT_union,
ListenerMixin,
Expand Down
4 changes: 2 additions & 2 deletions lib/pynput/mouse/_xorg.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

# pylint: disable=W0611
try:
import pynput._util.xorg
from .._util import xorg
except Exception as e:
raise ImportError('failed to acquire X connection: {}'.format(str(e)), e)
# pylint: enable=W0611
Expand All @@ -42,7 +42,7 @@
import Xlib.X
import Xlib.protocol

from pynput._util.xorg import (
from .._util.xorg import (
display_manager,
ListenerMixin)
from . import _base
Expand Down