Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] native menu items documentation on linux is missing #3882

Open
p32929 opened this issue Apr 10, 2022 · 5 comments
Open

[doc] native menu items documentation on linux is missing #3882

p32929 opened this issue Apr 10, 2022 · 5 comments

Comments

@p32929
Copy link

@p32929 p32929 commented Apr 10, 2022

Describe the bug

Hello, first of all, thank you for making and maintaining Tauri.
So, 've been making a test app using Tauri. but it seems, the CTRL/COMMAND + Z keyboard shortcut ( along with many other keyboard shortcuts ) stops working inside the app.

I also have added a menu like this one: https://github.com/windht/watcher/blob/bd929e555319c3e6c4565a2631b63a04918c03fb/src-tauri/src/main.rs

But it looks like this:
Screenshot from 2022-04-09 23-32-45

Any solutions? Thanks

Reproduction

  1. create a tauri app with a text input within the app
  2. write something in the app
  3. now try to undo the text using keyboard shortcuts

Expected behavior

Keyboard shortcuts to work as expected inside the app

Platform and versions

Environment
  › OS: Linux 16 X64
  › Node.js: 16.14.0
  › npm: 8.3.1
  › pnpm: 6.32.3
  › yarn: 1.22.18
  › rustup: 1.24.3
  › rustc: 1.59.0
  › cargo: 1.59.0
  › Rust toolchain: stable-x86_64-unknown-linux-gnu 

Packages
  › @tauri-apps/cli [NPM]: 1.0.0-rc.7
  › @tauri-apps/api [NPM]: 1.0.0-rc.3
  › tauri [RUST]: 1.0.0-rc.6,
  › tauri-build [RUST]: 1.0.0-rc.5,
  › tao [RUST]: 0.7.0,
  › wry [RUST]: 0.14.0,

App
  › build-type: bundle
  › CSP: unset
  › distDir: ../build
  › devPath: http://localhost:3000/
  › framework: React

App directory structure
  ├─ .git
  ├─ .github
  ├─ build
  ├─ node_modules
  ├─ public
  ├─ src
  └─ src-tauri


### Stack trace

_No response_

### Additional context

_No response_
@FabianLars
Copy link
Member

@FabianLars FabianLars commented Apr 10, 2022

@team I asked for an issue about the undo/redo shortcuts only but thinking about it, we probably want to look at the MenuItems or at least their docs, since the latter doesn't seem to be accurate, many of them state that linux is supported (or at least don't say it is not supported) without actually working (that's why the menu looks like that, if you add an item that actually works it looks fine again).

@JonasKruckenberg
Copy link
Contributor

@JonasKruckenberg JonasKruckenberg commented Apr 10, 2022

So to understand this correctly, "builtins" for these common actions is just not a thing on Linux in general? Or it's just not widely supported/has a common standard behind it? Or is it just something we haven't gotten around to implementing yet?

@FabianLars
Copy link
Member

@FabianLars FabianLars commented Apr 10, 2022

No idea if your question is about the MenuItems or undo/redo not working, so i'll answer both.

MenuItems: tbh, no idea if we're talking about bugs or incorrect docs. Some of the (native) MenuItems specify that they don't work on Linux and they indeed don't.
Some others don't specify it but still don't work (see their linked example), while others work fine (Hide for example)

With "specify" i mean that they list Linux in the unsupported section.

undo/redo shortcuts: In tauri apps they generally don't work (no matter the distro) while it works fine in other gtk/webkitgtk based apps like epiphany (Gnome web). I didn't find much about webkitgtk in particular, but in gtk(3) in general it needs some manual implementation.

@lucasfernog
Copy link
Member

@lucasfernog lucasfernog commented Apr 21, 2022

I believe only some macOS menu items implementation are handled by the OS; the others are all implemented by tao.

@amrbashir
Copy link
Member

@amrbashir amrbashir commented May 2, 2022

Just looked over the menu items you chose and:

  • Copy, Cut, Paste and SelectAll are not supported on Linux yet, so we are missing documentation here.
  • Undo and Redo for now are only supported on macOS and we documented that.

@amrbashir amrbashir added the good first issue label May 2, 2022
@amrbashir amrbashir changed the title [bug] Keyboard shortcuts not working & menu not showing [doc] native menu items documentation on linux is missing May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants