rasmuslindroth / i3keys Goto Github PK
View Code? Open in Web Editor NEWLists available bindings for i3 or Sway with a graphical or text keyboard
License: MIT License
Lists available bindings for i3 or Sway with a graphical or text keyboard
License: MIT License
Hi, thanks for providing and maintaining this nice tool!
I am using sway on Fedora Linux 38.
$ sway --version
sway version 1.8.1
I am using the i3keys on the current latest master branch 99e368e.
In sway, it's possible to define symbol keys as the name starting with a capital letter first such as Return, Space, Semicolon, Comma, Period, Slash. I can see these keys are not shown as occupied (red color) on the page by the i3keys web
.
I don't see the capital letter first names worked in i3 config except "Return". But it's nice if i3keys considers the capital letter first key names.
I am using this sway config.
https://github.com/junaruga/framework-laptop-config/blob/main/home/.config/sway/config
set $mod Mod4
...
bindsym $mod+Return exec $term
...
bindsym $mod+Shift+Semicolon exec $term
...
# KEY_DELETE 111
bindsym $mod+Comma exec "sudo ydotool key 111:1 111:0"
# KEY_INSERT 110
bindsym $mod+Period exec "sudo ydotool key 110:1 110:0"
# KEY_ENTER 28
bindsym $mod+Slash exec "sudo ydotool key 28:1 28:0"
...
bindsym $mod+Semicolon mode "symbol"
bindsym $mod+Shift+Space mode "symbol"
I was able to see the following $mod+minus
was shown as occupied.
bindsym $mod+minus scratchpad show
Here is the actual screenshot. You can see these capital letter first keys are not shown as occupied (red).
Add the ability to list bindings in each mode. Maybe make it opitional, so it will save some space?
For Debian Testing + sway 1.5.1-2 + Firefox ESR 78.13.0esr (64-bit).
The Mod4+Shift keyboard has both the Super_ and Shift_ modifier keys colored green.
The Mod4+Alt keyboard has only the Super_ keys colored green - the Alt_ keys are white.
I have no Mod4_Ctrl keybindings, so I suppose that is why there is no Mod4+Ctrl keyboard.
(Likewise with Mod4+Shift+Alt or Mod4+Ctrl+Alt or Mod4+Shift+Alt+Ctrl ... ?)
Therefore, I do not know if there is also a problem with the other modifier combinations...
Add support for displaying media keys that are used. If used in one mode, display them as available in all modes
Neat program, thanks. Is there a way to show the action bound to each key?
Hello,
I have some keybinds that use the Ctrl+Shift+key combination (for PrintScreen in my case), is it possible to support that? Eventually support all combinations automatically?
Thanks.
Installing/updating via the AUR package seems to create the directory $HOME/go
. Isn't there any way to avoid creating a new directory in $HOME
?
Just for information, I noticed that an include like include $HOME/.config/sway/config.d/*
(valid in sway and used by some distros) results in couldn't expand the following command in include: HOME
.
This is of little consequence in practice, simply replacing $HOME
with ${HOME}
in the config works for both sway and i3keys.
I haven't used i3 in a long time but looks like it now supports includes and accepts that syntax too.
I just thought I'd mention it, personally I adjusted the config as above and called it a day.
Note, I'm using the 0.0.14-1 from the AUR.
I'll happily do the work necessary and generate a PR. would you be open to exposing a small api for parsing bindings?
getting this error as of this week
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
github.com/RasmusLindroth/i3keys/internal/i3parse.parseBinding(0xc00047c780, 0x5, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
internal/i3parse/parse.go:339 +0x2e5
github.com/RasmusLindroth/i3keys/internal/i3parse.parseConfig(0x8eb280, 0xc00000e660, 0xc0000267c0, 0x1a, 0xb71e88, 0x21, 0x40, 0x0, 0x0, 0x203000, ...)
internal/i3parse/parse.go:210 +0x4f5
github.com/RasmusLindroth/i3keys/internal/i3parse.parse(0x8eb280, 0xc00000e660, 0x0, 0x0, 0x848040, 0xc000060c60, 0xc000158690, 0xc00015fb58, 0x1, 0x81e180, ...)
internal/i3parse/parse.go:244 +0x96
github.com/RasmusLindroth/i3keys/internal/i3parse.ParseFromRunning(0x0, 0x0, 0xc000158460, 0x100010070, 0xc000158460, 0x4, 0xc00015fa58, 0x77b371, 0xc0000000c, 0xc000021200)
internal/i3parse/parse.go:78 +0x78
github.com/RasmusLindroth/i3keys/internal/web.Output(0x0, 0x0, 0x7fffcb461a08, 0x4)
internal/web/output.go:22 +0x50
main.main()
i3keys.go:67 +0x55c
hey mate i dont know if you are still working on this but any way you could make it so that things like below will work. because i myself do you use bindsym in the config itself my keys dont seem to show up at all if you want an example of my config here it is
set $super Mod4
set $super_b bindsym Mod4
set $alt Mod1
set $alt_b bindsym Mod1
set $control Control
set $control_b bindsym Control
set $shift Shift
set $shift_b bindsym Shift
set $exe exec --no-startup-id
set $exe_always exec_always --no-startup-id
The ordering is currently based on which appears first in i3config. For me, this is:
Mod4+shift
Mod4
Mod4+Shift
No modifiers
Mod1+Mod4
Mod1
Mod1+shift
Mod4+ctrl
Mod4+ctrl+shift
Mod1+Mod4+shift
ctrl+shift
ctrl
shift
Mod1+Mod4+ctrl
It would be nice to get some consistency in sort order. For instance:
Mod4 # which I use more than Mod1... auto-detected?
Mod4+Shift # combined with Mod4+shift
Mod4+Ctrl
Mod4+Ctrl+Shift
Mod1
Mod1+Shift
Mod1+Mod4
Mod1+Mod4+Shift
No modifiers
Shift
Ctrl
Ctrl+Shift
(And perhaps some way to filter prefixes (e.g. selecting Mod4
) and show only those keyboard layouts, to prevent information overload. Or a table of contents with relative links. But that's outside the scope of this issue!)
I'm getting this error while trying to install
sam@***:[~/Downloads/i3keys] (master)
$ go install
go: downloading github.com/gorilla/handlers v1.4.0
go: downloading github.com/gorilla/mux v1.7.1
go: downloading go.i3wm.org/i3/v4 v4.17.0
go: downloading github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e
go: downloading github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802
# github.com/RasmusLindroth/i3keys/internal/xlib
internal/xlib/xlib.go:8:11: fatal error: X11/extensions/XTest.h: No such file or directory
8 | // #include <X11/extensions/XTest.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
There is a fairly widespread way of making overlays on Wayland using gtk-layer-shell.
For example, wlogout does it for logout buttons.
Would it be possible to add support to show the keymap in an overlay?
It would be very cool if this could handle 'include' statements in the config to pull in other config files with key definitions.
It seems to be valid to have a mode without quotes like this mode $foo {
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.