Comments (1)
Technical Details
Issue Analysis: Further investigation into the application's codebase revealed that the behavior is due to the isCtrlOrAlt
function not recognizing the Option
(also known as Alt
on non-Mac systems) key on macOS. The current implementation of the function is as follows:
// ts/hooks/useKeyboardShortcuts.tsx:22
function isCtrlOrAlt(ev: KeyboardEvent): boolean {
const { altKey, ctrlKey } = ev;
const controlKey = get(window, 'platform') === 'darwin' && ctrlKey;
const theAltKey = get(window, 'platform') !== 'darwin' && altKey;
return controlKey || theAltKey;
}
This code checks for the ctrlKey
when the platform is darwin
(macOS), which does not account for the macOS convention of using the Option
key for functionalities often associated with the Alt
key on other platforms.
Proposed Code Modification: To address this issue, it is recommended to modify the isCtrlOrAlt
function to recognize both the ctrlKey
and altKey
on macOS, thereby aligning with the expected behavior of the Option
key by macOS users. A corrected version of the function is proposed below:
// ts/hooks/useKeyboardShortcuts.tsx:22
function isCtrlOrAlt(ev: KeyboardEvent): boolean {
const { altKey, ctrlKey } = ev;
// For macOS, check both ctrlKey and altKey, as users might expect the Option key to function similarly to Alt
const isMac = get(window, 'platform') === 'darwin';
const controlOrAltOnMac = isMac && (ctrlKey || altKey);
const altKeyOnOthers = !isMac && altKey;
return controlOrAltOnMac || altKeyOnOthers;
}
By implementing this change, the application should correctly recognize the Option + ArrowUp
keyboard shortcut as intended for navigating between chats on macOS, without inadvertently triggering the edit functionality of the last message.
from signal-desktop.
Related Issues (20)
- Signal crashes (doesn't open) | Ubuntu 24.04 with AMD Radeon™ gives "Cannot find target for triple amdgcn-- Unable to find target for this triple (no targets are registered)" HOT 8
- Signal on macOS often unlinks HOT 5
- Problems behind proxy since update 7.5 HOT 15
- Packaging stops working after Sonoma upgarde on M1 MacBook HOT 4
- CMD+ArrowUp edit last message doesn't work HOT 2
- [Linux] Signal Desktop allowing multiple instances to be open if minimized to tray HOT 3
- notifications not being recognized and saved in plasma notification history HOT 1
- Text is invisible in Desktop app HOT 7
- Emoji search function misbehaving HOT 5
- "Disconnected" message gone on MacOS HOT 6
- [Accessibility] Signal's UI language no longer properly communicated to screen readers HOT 6
- App icon not shown on GNOME under Wayland HOT 3
- Search functionality in Signal Desktop isn't consistent with Signal Android
- Expiry notice on latest version Linux apt HOT 1
- Windows 7.4.0.0 - Unhandled Promise Rejection HOT 3
- All group function not working and not able to send group message HOT 1
- Numerous People Now Experiencing Issues I've been Reporting in Multiple Bugs Since 2023/09. HOT 3
- Voice Message/ Audio Message stops when switching application HOT 2
- Signal Crash HOT 3
- having trouble with set up as standalone with Signal-Desktop HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from signal-desktop.