Git Product home page Git Product logo

showmethekey's Introduction

Show Me The Key

Show keys you typed on screen.

Project Website

A SUSE Hack Week 20 Project: Show Me The Key: A screenkey alternative that works under Wayland via libinput.

Install

Distribution Package (Recommended)

AOSC OS

Just run following command to install from official repository:

# apt install showmethekey

Arch Linux

Install From AUR

$ yay showmethekey

Or use other AUR helpers.

Install From archlinuxcn

First add archlinuxcn repo to your system.

# pacman -S showmethekey

openSUSE

Install from OBS

Packages can be found in my OBS project.

# zypper ar https://download.opensuse.org/repositories/home:/AZhou/openSUSE_Tumbleweed/home:AZhou.repo
# zypper in showmethekey showmethekey-lang

Leap users please replace URL for Tumbleweed with URL for your Leap version.

Fedora

Install from COPR

To install the package on Fedora Workstation, run the following commands:

sudo dnf copr enable pesader/showmethekey
sudo dnf install showmethekey

If you are running an Atomic Desktop (Fedora Silverblue, Fedora Kinoite, Fedora Sericea, etc), run:

export RELEASE=39 # or whichever release of Fedora you are running
sudo curl -o /etc/yum.repos.d/showmethekey.repo https://copr.fedorainfracloud.org/coprs/pesader/showmethekey/repo/fedora-$RELEASE/pesader-showmethekey-fedora-$RELEASE.repo
rpm-ostree install showmethekey

Other Distributions

Please help package showmethekey to your distribution!

Build From Source

Dependencies

  • libevdev
  • udev (or systemd)
  • libinput
  • glib2
  • gtk4
  • libadwaita
  • json-glib
  • cairo
  • pango
  • libxkbcommon
  • polkit
  • meson
  • ninja
  • gcc

Build

$ git clone https://github.com/AlynxZhou/showmethekey.git
$ cd showmethekey
$ mkdir build && cd build && meson setup --prefix=/usr . .. && meson compile && meson install
$ showmethekey-gtk

Usage

For detailed usage please run usage dialog from app menu!

You need to toggle the switch to start it manually and need to input admin password to polkit authentication agent's dialog, because we need superuser permission to read keyboard events (this program does not handle your password so it is safe). Wayland does not allow a client to set its position, so this program does not set its position in preference, and you can click the "Clickable Area" in titlebar and drag the floating window to anywhere you want.

Users in wheel group can skip password authentication.

Special Notice for Wayland Session Users

There is no official Wayland protocol allowing toplevel clients to set their own position and layer, only users can change those things. But don't worry, users are always allowed to do those things by themselves if their compositors support it.

For example if you are using GNOME Shell (Wayland), you can right click the "Clickable Area" on title bar to show a window manager menu and check "Always on Top" and "Always on Visible Workspace" in it.

If you are using KDE Plasma (Wayland), you can right click "Floating Window - Show Me The Key" on task bar, check "Move to Desktop" -> "All Desktops" and "More Actions" -> "Keep Above Others".

For Sway users, you can add following configurations into ~/.config/sway/config to enable floating and sticky (thanks to haxibami's blog post:

for_window [app_id="one.alynx.showmethekey" title="Floating Window - Show Me The Key"] {
  floating enable
  sticky enable
}

Feature

screenkey is a popular project for streamers or tutorial recorders because it can make your typing visual on screen, but it only works under X11, not Wayland because it uses X11 functions to get keyboard event.

This program, instead, reads key events via libinput directly, and then put it on screen, so it will not depend on X11 or special Wayland Compositors and will work across them.

Project Structure

CLI

This part exists because of Wayland's security policy, which means you cannot run a GUI program with sudo (see https://wiki.archlinux.org/index.php/Running_GUI_applications_as_root#Wayland). It's suggested to split your program into a GUI frontend and a CLI backend that do privileged operations, and this is the backend, a custom re-write of https://gitlab.freedesktop.org/libinput/libinput/-/blob/master/tools/libinput-debug-events.c, based on libinput, libudev and libevdev.

It generates JSON in lines like {"event_name": "KEYBOARD_KEY", "event_type": 300, "time_stamp": 39869802, "key_name": "KEY_C", "key_code": 46, "state_name": "PRESSED", "state_code": 1}.

GTK

A GUI frontend based on GTK, will run CLI backend as root via pkexec, and show a transparent floating window to display events.

FAQ

Why your program needs root permission? screenkey never asks for it!

If you debug with libinput, you'll find it needs root permission, too. Because this program support both Wayland and X11, it does not get input events via display protocol, actually it's reading directly from evdev interface under /dev. And if you want to interact with files under /dev, you need root permission. screenkey does not needs root permission because it's heavily X11-based, it gets input events from X server instead of /dev, which already done it. And because of this it will never support Wayland.

I am using Sway/Wayfire/[not DEs], and I always get AUTHENTICATION FAILED in terminal!

This is a pkexec bug that it's tty authentication does not work, see https://gitlab.freedesktop.org/polkit/polkit/-/issues/17. Most DEs have their own authentication agents, but if you are not using them, pkexec will try to make itself an agent, and you get this bug.

A possible workaround is #2 (comment), actually you can use any agents, not only the gnome one.

Translate

If you changed translatable strings, don't forget to run meson compile showmethekey-update-po in build directory and then edit po files, and please check if there are fuzzy tag in comment, you should remove them and make translation exact, otherwise it will not work.

If you added new source files with translatable strings, don't forget to add it to showmethekey-gtk/po/POTFILES.in before running meson compile showmethekey-update-po. File paths in POTFILES.in should be relative to project directory.

If you want to add languages, first add a country code in showmethekey-gtk/po/LINGUAS, then run meson compile showmethekey-update-po, you will get a new .po file with your added country code. If this language needs UTF-8 encoding, don't use words like zh_CN.UTF-8 in showmethekey-gtk/po/LINGUAS or file name, because RPM's find_lang script may ignore them sometimes, and you should change to charset=UTF-8 manually in the header.

Name

As I want some clear name that hints its usage, but screenkey is already taken and I think visualkey sounds like Visual Studio and it's horrible. My friend @LGiki suggests Show Me The Key which sounds like "Show me the code" from Linus Torvalds. At first I think it's a little bit long, but now it is acceptable so it's called showmethekey or Show Me The Key.

The Chinese translate of this program name should be 让我看键, and it's only used for app window title, debug output, package name, desktop entry name and floating window title should not be translated. (The floating window title is important because some compositors relies on it to write window rules so you should never translate it!!!)

Icon

Program icon made by Freepik from www.flaticon.com.

showmethekey's People

Contributors

alynxzhou avatar bobby285271 avatar jirutka avatar lordrishav avatar mimir-d avatar mridhulka avatar pesader avatar whiredplanck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

showmethekey's Issues

`sudo showmethekey-gtk` not working: g_dbus_connection_emit_signal: assertion 'object_path != NULL && g_variant_is_object_path (object_path)' failed

my laptop: ubuntu 22.04, wayland, ibus-input-method, I installed showmethekey from source with compiling

sudo showmethekey-gtk just shows the Usage and main UI

  • But if I click Close, both ui exit and not working.
  • and the terminal is full of repeated messages as below
(showmethekey-gtk:361882): GLib-GIO-CRITICAL **: 03:05:03.717: g_dbus_connection_emit_signal: assertion 'object_path != NULL && g_variant_is_object_path (object_path)' failed  
Segmentation fault

  • if I start with showmethekey-gtk, no ui shows. and the terminal error message is
Gdk-Message: 03:24:59.079: Error 71 (Protocol error) dispatching to Wayland display.

sudo showmethekey-cli works; 👉🏻 showmethekey-cli shows no permission

Issue authenticating on wayland

Hi,

There's an issue when I input the password it just says "Authentication failed":

==== AUTHENTICATING FOR org.freedesktop.policykit.exec ====
Authentication is needed to run `/usr/bin/showmethekey-cli' as the super user
Authenticating as: soyuka
Password:
==== AUTHENTICATION FAILED ====

I'm on 5.13.7-arch1-1, sway 1.6.1 (wayland), journalctl says:

Aug 05 19:08:51 syk-xp5 polkitd[753]: Unregistered Authentication Agent for unix-process:413838:2875488 (system bus name :1.676, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Aug 05 19:08:50 syk-xp5 pkexec[413928]: soyuka: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/home/soyuka/forks/core] [COMMAND=/usr/bin/showmethekey-cli]
Aug 05 19:08:50 syk-xp5 polkitd[753]: Operator of unix-process:413838:2875488 FAILED to authenticate to gain authorization for action org.freedesktop.policykit.exec for unix-process:413838:2875488 [showmethekey-gtk] (owned by unix-user:soyuka)
Aug 05 19:08:50 syk-xp5 kernel: audit: type=1101 audit(1628183330.976:2328): pid=413937 uid=1000 auid=1000 ses=1 msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="soyuka" exe="/usr/lib/polkit-1/polkit-agent-helper-1" hostname=? addr=? terminal=? res=success'
Aug 05 19:08:50 syk-xp5 polkit-agent-helper-1[413937]: pam_systemd_home(polkit-1:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.

Any ideas or ways to get more debugging informations?

Tile clickable area

I would like to tile the clickable area.

In this way I can put it below my terminal and it won't cover it, as the terminal window will be resized to fit in it.

But I cannot tile it.

I use Hyprland, and even if I dispatch "togglefloating" to it, it stays floating always.

Doesn't understand Capslock bound to Escape

As a Vim user I mapped my Capslock to Escape in Gnome. This program didn't pick that up and every time I pressed Escape (My "Capslock") it shows Capslock and then all my keystrokes become uppercase. This might be a bit hard to implement because (if I understand it correctly) this reads directly from the input devices, so if it's too hard a toggle button for this configuration would be nice too.

Keys ignored if device_name contains \n

It breaks parsing:

(showmethekey-gtk:1812744): showmethekey-gtk-WARNING **: 22:39:24.556: Create event error: <data>:1:78: Parse error: scanner: unterminated string constant.

(showmethekey-gtk:1812744): showmethekey-gtk-WARNING **: 22:39:24.556: Create event error: <data>:1:8: Parse error: unexpected identifier `Line2', expected value.

libinput list-devices looks like

...
Device:           Line1
Line2
...

I think I might do PR to fix it

Meson fails to build on Debian 12 with `undefined reference to g_ptr_array_sort_values` error

Please can you help, it won't compile!

$git clone https://github.com/AlynxZhou/showmethekey.git
Cloning into 'showmethekey'...
remote: Enumerating objects: 924, done.
remote: Counting objects: 100% (294/294), done.
remote: Compressing objects: 100% (86/86), done.
remote: Total 924 (delta 242), reused 237 (delta 208), pack-reused 630
Receiving objects: 100% (924/924), 10.28 MiB | 8.12 MiB/s, done.
Resolving deltas: 100% (643/643), done.
david@debian:~/Downloads$ cd showmethekey/
david@debian:~/Downloads/showmethekey$ mkdir build && cd build && meson setup --prefix=/usr . .. && meson compile && meson install
The Meson build system
Version: 1.0.1
Source dir: /home/david/Downloads/showmethekey
Build dir: /home/david/Downloads/showmethekey/build
Build type: native build
Project name: showmethekey
Project version: 1.11.1
C compiler for the host machine: cc (gcc 12.2.0 "cc (Debian 12.2.0-14) 12.2.0")
C linker for the host machine: cc ld.bfd 2.40
Host machine cpu family: x86_64
Host machine cpu: x86_64
Configuring config.h using configuration
Found pkg-config: /usr/bin/pkg-config (1.8.1)
Run-time dependency libevdev found: YES 1.13.0
Run-time dependency libudev found: YES 252
Run-time dependency libinput found: YES 1.22.1
Run-time dependency threads found: YES
Run-time dependency gtk4 found: YES 4.8.3
Run-time dependency libadwaita-1 found: YES 1.2.2
Run-time dependency x11 found: YES 1.8.4
Run-time dependency glib-2.0 found: YES 2.74.6
Run-time dependency json-glib-1.0 found: YES 1.6.6
Run-time dependency gio-2.0 found: YES 2.74.6
Run-time dependency cairo found: YES 1.16.0
Run-time dependency pango found: YES 1.50.12
Run-time dependency xkbcommon found: YES 1.5.0
Run-time dependency xkbregistry found: YES 1.5.0
Found pkg-config: /usr/bin/pkg-config (1.8.1)
Program glib-compile-resources found: YES (/usr/bin/glib-compile-resources)
Program glib-mkenums found: YES (/usr/bin/glib-mkenums)
Program glib-mkenums found: YES (/usr/bin/glib-mkenums)
Program msgfmt found: YES (/usr/bin/msgfmt)
Program msginit found: YES (/usr/bin/msginit)
Program msgmerge found: YES (/usr/bin/msgmerge)
Program xgettext found: YES (/usr/bin/xgettext)
Configuring one.alynx.showmethekey.policy using configuration
Configuring one.alynx.showmethekey.desktop using configuration
Build targets in project: 10

showmethekey 1.11.1

  User defined options
    prefix: /usr

Found ninja-1.11.1 at /usr/bin/ninja
INFO: autodetecting backend as ninja                                                                
INFO: calculating backend command to run: /usr/bin/ninja
[9/19] Compiling C object showmethekey-gtk/showmethekey-gtk.p/smtk-keymap-list.c.o
../showmethekey-gtk/smtk-keymap-list.c: In function ‘smtk_keymap_list_sort’:
../showmethekey-gtk/smtk-keymap-list.c:261:9: warning: implicit declaration of function ‘g_ptr_array_sort_values’; did you mean ‘g_ptr_array_sort’? [-Wimplicit-function-declaration]
  261 |         g_ptr_array_sort_values(keymap_list->items, _compare);
      |         ^~~~~~~~~~~~~~~~~~~~~~~
      |         g_ptr_array_sort
[19/19] Linking target showmethekey-gtk/showmethekey-gtk
FAILED: showmethekey-gtk/showmethekey-gtk 
cc  -o showmethekey-gtk/showmethekey-gtk showmethekey-gtk/showmethekey-gtk.p/meson-generated_.._smtk-resources.c.o showmethekey-gtk/showmethekey-gtk.p/meson-generated_.._smtk-enum-types.c.o showmethekey-gtk/showmethekey-gtk.p/main.c.o showmethekey-gtk/showmethekey-gtk.p/smtk-app.c.o showmethekey-gtk/showmethekey-gtk.p/smtk-app-win.c.o showmethekey-gtk/showmethekey-gtk.p/smtk-keys-win.c.o showmethekey-gtk/showmethekey-gtk.p/smtk-keys-area.c.o showmethekey-gtk/showmethekey-gtk.p/smtk-keys-emitter.c.o showmethekey-gtk/showmethekey-gtk.p/smtk-keys-mapper.c.o showmethekey-gtk/showmethekey-gtk.p/smtk-keymap-list.c.o showmethekey-gtk/showmethekey-gtk.p/smtk-event.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group /usr/lib/x86_64-linux-gnu/libgtk-4.so /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so /usr/lib/x86_64-linux-gnu/libpango-1.0.so /usr/lib/x86_64-linux-gnu/libharfbuzz.so /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so /usr/lib/x86_64-linux-gnu/libcairo-gobject.so /usr/lib/x86_64-linux-gnu/libcairo.so /usr/lib/x86_64-linux-gnu/libgraphene-1.0.so /usr/lib/x86_64-linux-gnu/libgio-2.0.so /usr/lib/x86_64-linux-gnu/libgobject-2.0.so /usr/lib/x86_64-linux-gnu/libglib-2.0.so /usr/lib/x86_64-linux-gnu/libadwaita-1.so /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libjson-glib-1.0.so /usr/lib/x86_64-linux-gnu/libxkbcommon.so /usr/lib/x86_64-linux-gnu/libxkbregistry.so -Wl,--end-group
/usr/bin/ld: showmethekey-gtk/showmethekey-gtk.p/smtk-keymap-list.c.o: in function `smtk_keymap_list_sort':
/home/david/Downloads/showmethekey/build/../showmethekey-gtk/smtk-keymap-list.c:261: undefined reference to `g_ptr_array_sort_values'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

如何调整字体大小?

你好,开启后如下图所示,字体显示太小了,请问如何调整这个字体的大小呢?

图片

showmethekey 版本如下:

paru -Qi showmethekey 
Name            : showmethekey
Version         : 1.12.0-1
Description     : A screenkey alternative that works under Wayland via libinput.
Architecture    : x86_64
URL             : https://showmethekey.alynx.one/
Licenses        : Apache
Groups          : None
Provides        : None
Depends On      : libevdev  udev  libinput  glib2  gtk4  libadwaita  json-glib  cairo  pango  libxkbcommon  polkit
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 143.25 KiB
Packager        : lilac (on behalf of Alynx Zhou) <[email protected]>
Build Date      : Fri 10 Nov 2023 08:56:53 PM CST
Install Date    : Sat 11 Nov 2023 08:28:19 AM CST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

我的桌面环境如下:

fastfetch 
                  -`                     everyx@Arch
                 .o+`                    -----------
                `ooo/                    OS: Arch Linux x86_64
               `+oooo:                   Host: TM1604 (XMAKB3M0P1A12)
              `+oooooo:                  Kernel: 6.6.2-arch1-1
              -+oooooo+:                 Uptime: 19 hours, 35 mins
            `/:-:++oooo+:                Packages: 1452 (pacman)
           `/++++/+++++++:               Shell: fish 3.6.1
          `/++++++++++++++:              Display (Dell Inc. 24"): 1920x1200 @ 60Hz [External]
         `/+++ooooooooooooo/`            Display (BOE06B7): 1920x1080 @ 60Hz [Built-in]
        ./ooosssso++osssssso+`           DE: Gnome 45.1
       .oossssso-````/ossssss+`          WM: Mutter (Wayland)
      -osssssso.      :ssssssso.         WM Theme: Custom-Accent-Colors
     :osssssss/        osssso+++.        Theme: Adw [GTK2/3/4]
    /ossssssss/        +ssssooo/-        Icons: ePapirus-Dark [GTK2/3/4]
  `/ossssso+/:-        -:/+osssso+-      Font: Sans (10pt) [GTK2/3/4]
 `+sso+:-`                 `.-/+oso:     Cursor: Adwaita (24px)
`++:.                           `-/+/    Terminal: GNOME Console 45.0
.`                                 `/    Terminal Font: Monospace (10pt)

/usr/local

It would be great if there is a build option to install into /usr/local instead of /usr, as mentioned in https://unix.stackexchange.com/questions/8656/usr-bin-vs-usr-local-bin-on-linux:

/usr/local/bin is for normal user programs not managed by the distribution package manager, e.g. locally compiled packages. You should not install them into /usr/bin because future distribution upgrades may modify or delete them without warning.

Here's the commands that I came up with, but somehow when I click the toggle button to turn it on, it snaps back and the window flashes.

sudo cp build/showmethekey-cli /usr/local/bin/ -i
sudo cp build/showmethekey-gtk /usr/local/bin/ -i
mkdir -p /usr/loal/share/locale/zh_CN/LC_MESSAGES
sudo cp showmethekey-gtk/po/zh_CN/LC_MESSAGES/showmethekey.mo \
    /usr/local/share/locale/zh_CN/LC_MESSAGES
sudo mkdir -p /usr/local/share/licenses/showmethekey/
sudo cp LICENSE to /usr/local/share/licenses/showmethekey/
sudo mkdir /usr/local/share/icons/hicolor/128x128/apps -p
sudo cp dists/icons/128x128/one.alynx.showmethekey.png /usr/local/share/icons/hicolor/128x128/apps
sudo mkdir /usr/local/share/icons/hicolor/64x64/apps -p
sudo cp dists/icons/64x64/one.alynx.showmethekey.png /usr/local/share/icons/hicolor/64x64/apps
sudo mkdir -p /usr/local/share/icons/hicolor/scalable/apps
sudo mkdir -p /usr/local/share/glib-2.0/schemas
sudo cp dists/one.alynx.showmethekey.gschema.xml /usr/local/share/glib-2.0/schemas
sudo cp dists/one.alynx.showmethekey.metainfo.xml /usr/local/share/metainfo
sudo mkdir -p /usr/local/share/applications
sudo cp build/one.alynx.showmethekey.desktop /usr/local/share/applications
sudo cp build/one.alynx.showmethekey.policy /usr/share/polkit-1/actions
sudo sed -i 's|/usr/bin/|/usr/local/bin/|' \
    /usr/local/share/applications/one.alynx.showmethekey.desktop \
    /usr/share/polkit-1/actions/one.alynx.showmethekey.policy
sudo /usr/bin/glib-compile-schemas /usr/local/share/glib-2.0/schemas
sudo /usr/bin/gtk4-update-icon-cache -f -t /usr/local/share/icons/hicolor
sudo update-desktop-database /usr/local/share/applications

By the way, providing a list of dependency names could really help building from source. Here's the packages that I installed on Ubuntu 23.04:

apt install -y git meson pkg-config libevdev-dev libudev-dev libinput-dev libgtk-4-dev \
    libadwaita-1-dev libjson-glib-dev libxkbregistry-dev gettext

Key input windows doesn't show up with gtk4

Gtk3 version seems to work fine. But with Gtk4 version, trying to open the usage dialog from menu or enabling input monitoring doesn't do anything. I don't know how I could help debug that, if you could give me some instruction please.

Running sway 1.7 wlroots 0.15.1

[Bug] Settings schema 'one.alynx.showmethekey' is not installed Trace/breakpoint trap

Cannot launch showmethekey in the build directory directly anymore in new releases, as the output complaints by running 'showmethekey-gtk' in "build/bin/":

(showmethekey-gtk:12316): GLib-GIO-ERROR **: 00:53:51.787: Settings schema 'one.alynx.showmethekey' is not installed
Trace/breakpoint trap

By the way, 'showmethekey-cli' in the same directory works without problem.

Meson compile log:

00:48 $ meson setup --prefix=/usr . ..
The Meson build system
Version: 1.2.0
Source dir: /home/apple/TestArea/showmethekey
Build dir: /home/apple/TestArea/showmethekey/build
Build type: native build
Project name: showmethekey
Project version: 1.11.1
C compiler for the host machine: cc (gcc 12.2.0 "cc (GCC) 12.2.0")
C linker for the host machine: cc ld.bfd 2.39
Host machine cpu family: x86_64
Host machine cpu: x86_64
Configuring config.h using configuration
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Run-time dependency libevdev found: YES 1.13.0
Run-time dependency libudev found: YES 243
Run-time dependency libinput found: YES 1.23.0
Run-time dependency threads found: YES
Run-time dependency gtk4 found: YES 4.10.4
Run-time dependency libadwaita-1 found: YES 1.3.1
Run-time dependency x11 found: YES 1.8.7
Run-time dependency glib-2.0 found: YES 2.78.0
Run-time dependency json-glib-1.0 found: YES 1.6.6
Run-time dependency gio-2.0 found: YES 2.78.0
Run-time dependency cairo found: YES 1.16.0
Run-time dependency pango found: YES 1.50.14
Run-time dependency xkbcommon found: YES 1.5.0
Run-time dependency xkbregistry found: YES 1.5.0
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Program glib-compile-resources found: YES (/usr/bin/glib-compile-resources)
Program glib-mkenums found: YES (/usr/bin/glib-mkenums)
Program glib-mkenums found: YES (/usr/bin/glib-mkenums)
Program msgfmt found: YES (/usr/bin/msgfmt)
Program msginit found: YES (/usr/bin/msginit)
Program msgmerge found: YES (/usr/bin/msgmerge)
Program xgettext found: YES (/usr/bin/xgettext)
Configuring one.alynx.showmethekey.policy using configuration
Configuring one.alynx.showmethekey.desktop using configuration
Build targets in project: 10

showmethekey 1.11.1

  User defined options
    prefix: /usr

Found ninja-1.11.1 at /usr/bin/ninja
✔ ~/TestArea/showmethekey/build [master|✔]                   
00:49 $ meson compile
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja
[19/19] Linking target showmethekey-gtk/showmethekey-gtk

Haven't tested to install showmethekey to the system yet.

Or anyway to uninstall the program clearly after installation by "meson install"?

Any ideas?

ERROR: Dependency "libevdev" not found, tried pkgconfig and cmake

Hi, I got an error:

Run-time dependency libevdev found: NO (tried pkgconfig and cmake)

../showmethekey-cli/meson.build:7:0: ERROR: Dependency "libevdev" not found, tried pkgconfig and cmake

A full log can be found at /tmp/showmethekey-1.7.3/build/meson-logs/meson-log.txt

But they are installed:

❯ sudo dnf install libevdev meson python3-libevdev

Last metadata expiration check: 2:20:25 ago on Sat 08 Oct 2022 11:46:39 AM WIB
.
Package libevdev-1.13.0-1.fc36.x86_64 is already installed.
Package meson-0.62.2-1.fc36.noarch is already installed.
Package python3-libevdev-0.10-1.fc36.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete
OS: Fedora Linux 36 (Workstation Edition) x86_64
Kernel: 5.19.12-200.fc36.x86_64
Shell: zsh 5.8.1
DE: GNOME 42.5
WM: Mutter

单独的 ctrl+shift 没有被视为组合键

当【显示模式】为按键名时,【单独显示】不会生效。
当【显示模式】为组合键时,【单独显示】生效,但问题在于,ctrl+shift 不会被视为组合键,也不会显示出来你按下了该按键,这包括【单独显示】在没有打开的状态。

Integrate with Mechvibes [Feature Request]

Thank you for this wonderful app. As I've been using it, I've come to appreciate that it's the only application that fully supports native Wayland.
The experience has been exceptional, and I believe it could become even better If we could have the simulated mechanical keyboard and mouse click sounds integrated into this app.
Currently no app provides this feature on wayland.
It would truly become an all-in-one native Wayland multipurpose application.

disabled Width and Height

My distro is fedora 38 and i can't change size of keystroke area.

obs:
It Can be add a abbreviation view? Delete -> Del and icon for Enter and Backspace?

Crash while compiling version 1.3.1 in Archlinux with GNOME40

Hi,

I'm trying to install showmethekey in Archlinux with GNOME 40 but it fails while compiling it.

Here is the installation log:

:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1]  showmethekey-git-r35.daee517-1

:: Downloaded PKGBUILD (1/1): showmethekey-git
  1 showmethekey-git                 (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
:: (1/1) Parsing SRCINFO: showmethekey-git
==> Making package: showmethekey-git r35.daee517-1 (Sat 17 Apr 2021 12:42:04 PM CEST)
==> Retrieving sources...
  -> Cloning showmethekey git repo...
Cloning into bare repository '/home/fran/.cache/yay/showmethekey-git/showmethekey'...
remote: Enumerating objects: 357, done.
remote: Counting objects: 100% (357/357), done.
remote: Compressing objects: 100% (227/227), done.
remote: Total 357 (delta 237), reused 233 (delta 117), pack-reused 0
Receiving objects: 100% (357/357), 102.97 KiB | 334.00 KiB/s, done.
Resolving deltas: 100% (237/237), done.
==> Validating source files with sha512sums...
    showmethekey ... Skipped
==> Making package: showmethekey-git r35.daee517-1 (Sat 17 Apr 2021 12:42:08 PM CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating showmethekey git repo...
Fetching origin
==> Validating source files with sha512sums...
    showmethekey ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of showmethekey git repo...
Cloning into 'showmethekey'...
done.
==> Starting prepare()...
==> Starting pkgver()...
==> Updated version: showmethekey-git r49.40fffb1-1
==> Sources are ready.
==> Making package: showmethekey-git r49.40fffb1-1 (Sat 17 Apr 2021 12:42:14 PM CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting pkgver()...
==> Starting build()...
+ exec meson setup --prefix /usr --libexecdir lib --sbindir bin --buildtype plain --auto-features enabled --wrap-mode nodownload -D b_lto=true -D b_pie=true . ..
The Meson build system
Version: 0.57.2
Source dir: /home/fran/.cache/yay/showmethekey-git/src/showmethekey
Build dir: /home/fran/.cache/yay/showmethekey-git/src/showmethekey/build
Build type: native build
Project name: showmethekey
Project version: 1.3.1
C compiler for the host machine: cc (gcc 10.2.0 "cc (GCC) 10.2.0")
C linker for the host machine: cc ld.bfd 2.36.1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Configuring config.h using configuration
Found pkg-config: /bin/pkg-config (1.7.3)
Run-time dependency libevdev found: YES 1.11.0
Run-time dependency libudev found: YES 248
Run-time dependency libinput found: YES 1.17.1
Run-time dependency threads found: YES
Run-time dependency gtk+-3.0 found: YES 3.24.28
Run-time dependency glib-2.0 found: YES 2.68.1
Run-time dependency json-glib-1.0 found: YES 1.6.2
Run-time dependency gio-2.0 found: YES 2.68.1
Run-time dependency cairo found: YES 1.17.4
Run-time dependency pango found: YES 1.48.4
Run-time dependency xkbcommon found: YES 1.2.1
Found pkg-config: /bin/pkg-config (1.7.3)
Program glib-compile-resources found: YES (/bin/glib-compile-resources)
Program glib-mkenums found: YES (/bin/glib-mkenums)
Program glib-mkenums found: YES (/bin/glib-mkenums)
Program glib-compile-schemas found: YES (/bin/glib-compile-schemas)
Build targets in project: 9

Found ninja-1.10.2 at /bin/ninja
ninja: Entering directory `.'
[9/16] Compiling C object showmethekey-gtk/showmethekey-gtk.p/smtk-app-win.c.o
FAILED: showmethekey-gtk/showmethekey-gtk.p/smtk-app-win.c.o 
cc -Ishowmethekey-gtk/showmethekey-gtk.p -Ishowmethekey-gtk -I../showmethekey-gtk -I. -I.. -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cloudproviders -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/at-spi-2.0 -I/usr/include/json-glib-1.0 -flto=auto -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -march=x86-64 -mtune=generic -O2 -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fPIE -pthread -MD -MQ showmethekey-gtk/showmethekey-gtk.p/smtk-app-win.c.o -MF showmethekey-gtk/showmethekey-gtk.p/smtk-app-win.c.o.d -o showmethekey-gtk/showmethekey-gtk.p/smtk-app-win.c.o -c ../showmethekey-gtk/smtk-app-win.c
../showmethekey-gtk/smtk-app-win.c: In function ‘smtk_app_win_on_keys_win_switch_active’:
../showmethekey-gtk/smtk-app-win.c:77:5: error: format not a string literal and no format arguments [-Werror=format-security]
   77 |     g_warning(error->message);
      |     ^~~~~~~~~
cc1: some warnings being treated as errors
[15/16] Compiling C object showmethekey-gtk/showmethekey-gtk.p/meson-generated_.._smtk-enum-types.c.o
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
    Aborting...
error making: showmethekey-git

Custom keyboard layout

Hi,

First of all thank you for this awesome piece of software! Having all the possible keyboard layouts is great too.

However, I've remapped some of my keyboard keys to some other functions thanks to xmodmap, so showmethekey doesn't get the actual input.

Would it be possible to give this layout to the software? I'm not sure about the way it works, but that would be just fantastic.

Have a great day!

Compact view

It would be really cool to have a compact view like in Screenkey e.g. Space could be displayed as

image

or e.g. Right by

image

Even more advanced would be if I type twice, it prints x2

Mapped key shown wrong.

I have mapped caps lock as my esc key and shift + caps lock as normal caps lock.

  • When I press capslock which is esc, shows caps lock instead of esc.
  • When I press letters after pressing caps lock which is escape. Instead of default state It shows letters in capital, and shows small again if I press caps lock which is actually esc in my computer.
  • Its okay if it shows caps lock instead of esc, But when I type letters, it shows capital and small letters in its windows even when I have not turned on caps lock yet with shift + caps lock. I work at neovim and its crucial to get accurate keys and this didn't help. I am using fedora 39 with gnome, wayland.
  • Still its an awesome tool but Didn't help me, Hope it gets fixed so I can use again.
  • Dev can try by mapping caps lock as esc once and check what I just said.

Thanks

Clickable Area not clickable, V1.7.1 Wayland

Since v1.7.1 the clickable area is not clickable any more on Gnome 42 (Arch Linux, Gnome Shell 42.3, Wayland 1.21.0)

When you click on "clickable area", you click through like the output area (same for right, left and middle click).

When starting showmethekey-gtk from CLI, the following error message occurs multiple time:

(showmethekey-gtk:41018): Gtk-WARNING **: 08:55:58.002: GtkImage 0x55a159b44610 reported baselines of minimum -2147483648 and natural -2147483648, but sizes of minimum 16 and natural 16. Baselines must be inside the widget size.

v1.6.3 works as expected

Switch keyboard layout

Hi there,

I'm using a german keyboard layout (QWERTZ) and notices that keys like ö, ü and ä are displayed as ;, [ and '. Is it possible to change the whole layout or can I map the displayed keys manually?

Suggestion for mouse clicks

Hi!

First of all, thank you for this app, which is a life-saver for preparing screencasts in Linux. It works well, is well-documented, and is the only one I managed to use for a screencast for my gnome extension.

A suggestion: it is true that the mouse clicks "can be very annoying" 😉 (as you say in the configuration windows). It would be better to have small icons with the mouse and the pressed key backed out, similar to what KmCaster does --- but with the scrolling events like in your app, which is much more useful for understanding what the user is doing.

Close to tray

Hi, thanks for the project!
Unfortunately, it currently has not yet similar possibilities with screenkey.
Would you like to add close to tray function? So the app window will not be shown in the taskbar.

Option to hide boxes around keys

The boxes are kinda ugly to look at. It would be great if there's an option to hide them and just have some gap between key combos.

[Request] Please add option to show shift

Thanks for working on this project.

I think that when people are following along,
they might miss the distinction between
r and R, especially when it is a Ctrl+r vs Ctrl+R

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.