diff --git a/README.md b/README.md index 297e89a..19b7530 100644 --- a/README.md +++ b/README.md @@ -39,14 +39,25 @@ The project was renamed to Arcane to avoid the generic nature of the previous na ## Quick Setup ([PyPi.org](https://pypi.org)) -The recommended way to install and launch the Arcane viewer is to first create a virtual environment. This can be done using **virtualenv** as follows: +*Creating a virtual environment is recommended to avoid conflicts with other Python packages but is not required.* ```bash pip install virtualenv python -m venv venv +``` + +### macOS / Linux + +```bash source venv/bin/activate ``` +### Windows + +```bash +.\venv\Scripts\activate +``` + You can either install the official package from PyPi.org: ```bash @@ -71,10 +82,11 @@ For detailed instructions on how to use and configure the Arcane Server, please ## Version Table -| Version | Protocol Version | Release Date | Compatible Servers | -|---------|------------------|-------------------|--------------------| +| Version | Protocol Version | Release Date | Compatible Servers | +|---------|------------------|-------------------|-----------------------------------------------------------------------| | 1.0.5b | 5.0.1 | 22 August 2024 | [1.0.4](https://github.com/PhrozenIO/ArcaneServer/releases/tag/1-0-4) | -| 1.0.6 | 5.0.2 | 17 September 2024 | | +| 1.0.6 | 5.0.2 | 17 September 2024 | [1.0.5](https://github.com/PhrozenIO/ArcaneServer/releases/tag/1-0-5) | +| 1.0.7 | 5.0.2 | 30 September 2024 | [1.0.5](https://github.com/PhrozenIO/ArcaneServer/releases/tag/1-0-5) | > ⓘ You can use any version of the viewer with any version of the server, as long as the protocol version matches. The protocol version ensures compatibility between the viewer and the server. @@ -104,6 +116,12 @@ For detailed instructions on how to use and configure the Arcane Server, please ## Change Log +### Version 1.0.7 + +- **Mouse Positioning Fix:** Resolved an issue where the mouse position was incorrect when the remote desktop is smaller than the local desktop in mirror mode. The mouse is now accurately positioned across screens of different sizes. +- **`CTRL+[A-Z]` Shortcut Fix for Windows:** Fixed a bug on the Windows client where `CTRL + [A-Z]` keyboard shortcuts were not functioning properly. Shortcuts are now correctly processed. +- **Connection Window Enhancements:** Pressing ESC on the connection window now closes the application. Pressing ENTER or RETURN starts the connection process immediately. + ### Version 1.0.6 - [x] **Arcane Protocol Update:** The protocol has been upgraded to version 5.0.2, bringing support for several server improvements, including dynamic display resolution updates, HDPI settings changes, and Secure Desktop support for Remote Desktop Streaming and Input (Mouse, Keyboard, Clipboard).] diff --git a/arcane_viewer/arcane/constants.py b/arcane_viewer/arcane/constants.py index 7823c4c..01ae019 100644 --- a/arcane_viewer/arcane/constants.py +++ b/arcane_viewer/arcane/constants.py @@ -25,7 +25,7 @@ def get_asset_file(asset_name: str) -> str: # Application Information -APP_VERSION = "1.0.6" +APP_VERSION = "1.0.7" APP_NAME = "Arcane" APP_ORGANIZATION_NAME = "Phrozen" APP_DISPLAY_NAME = f"{APP_NAME} {APP_VERSION}" diff --git a/arcane_viewer/ui/custom_widgets/tangeant_universe.py b/arcane_viewer/ui/custom_widgets/tangeant_universe.py index 8d3c42c..81239b4 100644 --- a/arcane_viewer/ui/custom_widgets/tangeant_universe.py +++ b/arcane_viewer/ui/custom_widgets/tangeant_universe.py @@ -70,15 +70,8 @@ def fix_mouse_position(self, x: Union[int, float], y: Union[int, float]) -> Tupl if self.desktop_screen is None: return x, y - if self.desktop_screen.width > self.width(): - x_ratio = self.desktop_screen.width / self.width() - else: - x_ratio = self.width() / self.desktop_screen.width - - if self.desktop_screen.height > self.height(): - y_ratio = self.desktop_screen.height / self.height() - else: - y_ratio = self.height() / self.desktop_screen.height + x_ratio = self.desktop_screen.width / self.width() + y_ratio = self.desktop_screen.height / self.height() # We must take in account both virtual desktop size and original screen X, Y position. return (self.desktop_screen.x + (x * x_ratio), @@ -218,7 +211,7 @@ def keyPressEvent(self, event: Optional[QKeyEvent]) -> None: # Handle Ctrl + C, Ctrl + V, Ctrl + X etc.. CTRL + [A-Z] if (Qt.Key.Key_A <= event.key() <= Qt.Key.Key_Z) and \ event.modifiers() == Qt.KeyboardModifier.ControlModifier: - key_text = "{^}" + event.text().upper() + key_text = "{^}" + chr(event.key()) is_shortcut = True # Handle [F1-F12] and/or ALT + [F1-F12] diff --git a/arcane_viewer/ui/forms/connect.py b/arcane_viewer/ui/forms/connect.py index a2871d4..ef0b0fb 100644 --- a/arcane_viewer/ui/forms/connect.py +++ b/arcane_viewer/ui/forms/connect.py @@ -10,7 +10,7 @@ from typing import Optional from PyQt6.QtCore import QSettings, QSize, Qt, pyqtSlot -from PyQt6.QtGui import QIcon +from PyQt6.QtGui import QIcon, QKeyEvent from PyQt6.QtWidgets import (QDialog, QHBoxLayout, QLabel, QLineEdit, QMessageBox, QPushButton, QSpinBox, QVBoxLayout, QWidget) @@ -125,6 +125,18 @@ def __init__(self) -> None: self.adjust_size() + def keyPressEvent(self, event: Optional[QKeyEvent]) -> None: + """ Handle certain key events like ESC to close the window or ENTER to submit default action """ + if event is None: + return + + if event.key() == Qt.Key.Key_Return or event.key() == Qt.Key.Key_Enter: + self.submit_form() + elif event.key() == Qt.Key.Key_Escape: + self.close() + + super().keyPressEvent(event) + def read_default(self) -> None: """ Read default settings from the default.json file """ if not os.path.isfile(arcane.DEFAULT_JSON): diff --git a/setup.py b/setup.py index c5cd643..4fbd5fe 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name='arcane_viewer', - version='1.0.6', + version='1.0.7', packages=find_packages(), include_package_data=True, install_requires=[