Skip to content

Commit

Permalink
Arcane Viewer 1.0.7 (#10)
Browse files Browse the repository at this point in the history
- **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.
  • Loading branch information
DarkCoderSc authored Sep 30, 2024
1 parent ed6462f commit 3d9ad6f
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 17 deletions.
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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).]
Expand Down
2 changes: 1 addition & 1 deletion arcane_viewer/arcane/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
13 changes: 3 additions & 10 deletions arcane_viewer/ui/custom_widgets/tangeant_universe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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]
Expand Down
14 changes: 13 additions & 1 deletion arcane_viewer/ui/forms/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=[
Expand Down

0 comments on commit 3d9ad6f

Please sign in to comment.