Powerful keybindings easier than ever with KMonad

This tutorial is focused on KMonad a powerful tool for customizing your keyboard to work however you like.
Let me know what you think and if there is anything specific you would like to learn about.
KMonad link
github.com/david-janssen/kmonad
Tutorial link
github.com/david-janssen/kmon...
---------------► Wanna Support Me? ◀︎---------------
Github:
www.github.com/sponsors/gavinok
Patreon:
/ creator-home
---------------► Wanna Checkout My Dots? ◀︎---------------
Vimrc:
github.com/Gavinok/dotvim
Dotfiles:
Coming Soon
---------------► Come Join The Community◀︎---------------
LBRY:
open.lbry.com/@GavinFreeborn:...
Discord:
/ discord
Timestamps
00:00 Intro
03:22 Current state of the project
04:19 installation
05:07 Setting up a default config
05:46 Customizing KMonad
06:26 Comments
07:02 defcfg
07:59 Finding your device file
09:35 Overview of the syntax
11:48 Defining what keys can be remapped
12:59 Defining a layer
14:40 Aliases
16:13 Using layers
17:27 Macros
20:30 Conclusion

Пікірлер: 72

  • @MrMetanalysis
    @MrMetanalysis3 жыл бұрын

    Waaaa, someone made a KZread video about my pet-project. Thank you so much. To show appreciation for this great introduction, I've linked you in the README. This is David, who is starting to slowly do better health-wise too :-). Thank you for the well-wishes in the beginning of your vid.

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    Great to hear you are getting better. A great project like this deserves the attention.

  • @salmanfarooq8570

    @salmanfarooq8570

    2 жыл бұрын

    Oh believe David when I say that kmonad holds much more importance in my setup than someone's just another pet project. Kmonad is the best in it's class. And the fact it's built in Haskel is just a big cherry on top.

  • @ShawnFumo

    @ShawnFumo

    2 жыл бұрын

    I haven't had a chance to play with it yet, but am super excited! I've been thinking this kind of project would be helpful to those that don't have a mechanical keyboard yet or who need to use their laptop keyboard a lot. I was considering trying to start on it myself (maybe calling it VMK to fit in with QMK/ZMK but Virtual instead), but it seemed a pretty daunting project honestly. For it to already exist and be cross platform is great. :)

  • @Spl4tt
    @Spl4tt2 жыл бұрын

    Kmonad looks even better than I expected. Definitely gonna use it on my laptop once I have time to set it up. Thanks for the good explanations

  • @gpcureton
    @gpcureton8 ай бұрын

    Just came across Kmonad, I can't believe I haven't found it until now! I'm an all-keeb coder (*vim, tmux, qtile, etc...), but in order to get the most out of these things I've been using mechs like Planck and Moonlander, with layers burned into the keebs. But sometimes I'm stuck without my ZSA keyboards, and have only the laptop, and I really struggle! I've tried using Sxkhd to replicate the external layered keyboard experience, but it never works quite right. Kmonad lets me replicate my external QMK layouts almost one-for-one on my laptop keyboard. Now if I can just get a laptop with a columnar key layout... 🙂 Thanks David for a great project, and thanks Gavin for a great video!

  • @n0kodoko143
    @n0kodoko1432 жыл бұрын

    What a gem, thank you for sharing, and thank you to the devs!

  • @AtomToast
    @AtomToast3 жыл бұрын

    Finally, video coverage! I like how you call the caps lock key escape. Also you have the tap-hold section twice in your video

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    Ya thanks for pointing

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    It out

  • @isAif47

    @isAif47

    2 жыл бұрын

    That section tripped me up, I had to re-watch to make sure I am not going crazy.

  • @iAmTheWagon

    @iAmTheWagon

    2 жыл бұрын

    @@isAif47 Same xD

  • @auntiecarol
    @auntiecarol2 жыл бұрын

    Just compiled KMonad and settled down to read the doco and was directed here from the README. Fantastic! A video in 2021 that is pure passion and information, not some over produced "influencer" styled BS. (Unless you've green-screened a kitchen table kinda setup :D) Not even gonna check at the rest of your content before hitting "subscribe"; I just know it's going to be good. Anyway, I've got a T460 to mess around with and keybindings to over-engineer.

  • @didedoshka

    @didedoshka

    Жыл бұрын

    Reading it 10 month since, how did over engineering go?

  • @auntiecarol

    @auntiecarol

    Жыл бұрын

    @@didedoshka My `~/.XCompose` is perfect!

  • @tachmonite37
    @tachmonite372 жыл бұрын

    oro! 😲I can finally bring back my G13 back to life....in Linux. Using my G13 Windows macros was partially preventing me from using Linux as my daily driver. Thank you sooooo much for this video. Your content is amazing! 🥳👌👍

  • @kristun216
    @kristun216 Жыл бұрын

    Thank you. After seeing this I've finished setting up Systemd services and keyboard hooks for my keyboard to have the VIA/QMK functionality so I can be comfy anywhere with any keyboard

  • @ITalented
    @ITalented2 жыл бұрын

    exactly wht i have been looking for...thnks for this

  • @claudiusraphael9423
    @claudiusraphael94232 жыл бұрын

    Wow. Incredible pick, i can't even count how often the desire for something like this popped into my mind and ignited random rabbithole adventures. Thanks, for sharing! Regarding your presentation: - Very well articulated and nicely calm explained - comfy! - I agree with another commenter, slight angle for the face cam and a bit more space. I would like to point out, that - not only for viewing, but also for actively reproducing what you do - a classic blackscreen terminal (especially with dimmed font) is quite hard to follow. May i suggest you test inverting the screenshare when editing a video and see how it works out? As a middleground for a WYSIWYG approach aka no-after-effects but still comfortable to work in when presenting i still favor the good old Sun-setup: Color-scheme: Solarized Dark/Light + Font: Lucida Sans Unicode It is in comparison to most combinations especially good to read on lower resolutions and/or at a distance, no matter if it's an OLED, LED, Laser, LCD, Laserview, Plasma, CRT or even Print. Works with all Color-Ranges and monochrome. Keep it up, well done!

  • @noonegoingnowhere3910
    @noonegoingnowhere39103 жыл бұрын

    Waaaaaaaaaa, David just sent me this video, this is so nice :-)

  • @user-kx1zw9bf8m
    @user-kx1zw9bf8m7 ай бұрын

    Thanks! This video really helped me understand some of kmonad.

  • @pwojtcza
    @pwojtcza2 жыл бұрын

    I started learning dvorak keyboard layout, this will let me keep ctrl c, ctrl v keybinds in old place. Thanks, this is awesome

  • @cjbarroso
    @cjbarroso2 жыл бұрын

    Very good intro, thank you!

  • @maxreuv
    @maxreuv2 жыл бұрын

    Super awesome! Thank you!

  • @JulianInsua
    @JulianInsua6 ай бұрын

    This is awesome. THANKS!!!!!

  • @marcofumi7430
    @marcofumi74303 жыл бұрын

    Hey man, complete windows freak and IT noob here. Found your guide very helpful, I'm composing my layout slowly but surely. Struggling a bit to work around my Fn button on defsrc, I've assigned it KeyUnknown and it seems to work, since _ and XX would print errors in the console, but I'd like to keep it.

  • @nothingbshr5590
    @nothingbshr55903 жыл бұрын

    Just discovered this channel !

  • @iAmTheWagon
    @iAmTheWagon2 жыл бұрын

    Oh yes. Thank you so much. I've been wanting something like for a long time. I try other programs. Either they don't work or they're too much of a pain in the ass the get working. This is exciting.

  • @alexwexov4298
    @alexwexov42982 жыл бұрын

    Great video

  • @faisceaux106
    @faisceaux1063 жыл бұрын

    Awesome!

  • @claudiusraphael9423
    @claudiusraphael94232 жыл бұрын

    The remapping of "CTRL" onto hold "CAPS-LOCK" looks nice, but does it override the standard, so returns to the original state, or will it toggle nonetheless? Also wonder if it is possible to redirect the input with a mapped function, e.g. to capture sequences that are initiated on specific keys and/or combinations? For example i generally type with my hands set one letter to the right to stay centered on notebooks/laptops, because especially for coding it is not as stretchy and far easier to reach symbols and specials, but it also prevents me from leaning angled towards the keyboard and display when writing for hours. Now, it would seem the presented tool allows me to actually move the whole standard-characters one to the right, in that case "a" would be on "s" and so "a" would be free for something like "BACKSPACE". But, is it also doable to trigger the capture of a sequence by mapping a function that checks what is typed next? So i can conditionally output for example the "a" with accents out of a unicode-set, depending on which letter i press after (sotosay switch to a modal input that actively checks the following input), e.g. get a "à" when i type "sq" (on actual keyboard) or to get a "á" when typing "se"? Sorry, lol. Right now i'm just baffled by the possibilities if that would work reliably, not-app-specific and maybe even independent of the OS in use ... - simplifying special-character input - create language-specific layouts universally, but also optimized for specific use-cases, like stenography, phonemic writing, syllabary languages, programming with a fixed set of mnemonics interactively triggered by layout-switching on the fly - use in mobile and wpa ? Ooof, i need to breathe. So much universe ... Seriously though, if you or any other commenter has insights/hands-on experience with the described scenario, i am eager to catch your follow-up! So, noice!

  • @bjornotto98
    @bjornotto98 Жыл бұрын

    Fuck this is so awesome, i messed arround with xmodmap and setxkbmap but i just couldnt figure it out, this is so much easier and a lot more powerfull. Thanks so much for sharing.

  • @lamprospitsillou6325
    @lamprospitsillou63253 жыл бұрын

    Wow I'll try it just to see if it's better than sxhkd. The layering seems really cool! But not full support for shell would make it somewhat difficult

  • @AtomToast

    @AtomToast

    3 жыл бұрын

    I personally use it in addition to sxhkd. They server different purposes for me

  • @copper4eva
    @copper4eva3 жыл бұрын

    Also, noice job using a model m in your thumbnail.

  • @lamprospitsillou6325
    @lamprospitsillou63253 жыл бұрын

    I would recommend putting your camera a bit further away, or even at an angle, I think it's a bit too close, and since you look at your keyboard most of the time we mostly see your hair. Please don't take it negatively 😅 , You make some unique content! That's all thank you very much, keep it up

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    Thanks for the feedback

  • @frozen_tortus
    @frozen_tortus2 жыл бұрын

    what are those icons on your workspace icons 1 2 3 and 4?

  • @Amike
    @Amike3 жыл бұрын

    This is great! I wanted to change to wayland but was hesitant because I have many dependencies of X, this fixes a couple

  • @copper4eva
    @copper4eva3 жыл бұрын

    Haven't watched the video so maybe this gets mentioned, but a big plus for this program is that it rebinds keys in both the tty and xorg. A problem with xbindkeys is that it only works in the x server. It's really annoying rebinding caps lock to esc with xbindkeys, and then every time you use vim in tty you screw up all the time.

  • @shilangyu

    @shilangyu

    3 жыл бұрын

    Yes, it is mentioned

  • @copper4eva

    @copper4eva

    3 жыл бұрын

    Yep, you mention it. Good job.

  • @linuxramblingproductions8554

    @linuxramblingproductions8554

    Жыл бұрын

    Same thing with me and ctrl on emacs

  • @adrian_franczak
    @adrian_franczak8 ай бұрын

    This looks like you can post this between devices because it operates on position in layouts instead of standard key names - first impression but I will try this becouse karabiners configuration don’t work well with home row mods

  • @bjornotto98
    @bjornotto98 Жыл бұрын

    Does somebody know if its possible to configure kmonad so that: When space key is pressed act as normal space When space key is being held switch to a layer until its released I tried: (defalias nspc (tap-next spc (layer-toogle mylayer))) But that doesnt seem to work.

  • @stephanearguin1227
    @stephanearguin12272 жыл бұрын

    Ok I have a Unicomp PC122 keyboard with F1-F24 keys and a bunch of additional keys on the left side of my keyboard (like Model F). Does anyone mapped this beast with KMonad? I'd like to have the same configuration on Linux (main OS), WIndows and OS/x (freelancer so it depends what my client runs on). Where can I find some help? Thanks

  • @orelsberg2781
    @orelsberg27812 жыл бұрын

    Is there any way to map alt+shift+hjkl to arrow keys? I haven't found anything on that anywhere

  • @GavinFreeborn

    @GavinFreeborn

    2 жыл бұрын

    You would have to make a layer to do that. Kinda a pain I know.

  • @donhjoe2162
    @donhjoe21622 жыл бұрын

    Can I remap my keyboard to use left handed numeric pad but without losing my original key letters. For example, create a layout to asign a shortcut to enable numeric pad, but the numeric pad could be letter 8 q, 7 w, 6 e, 5 a, 4 s, 3 d, 2 z, 1 x, 0 c?

  • @Dan-gs3kg

    @Dan-gs3kg

    2 жыл бұрын

    Yes. If you watched the video, that is one of the example layers in the tutorial keymap file.

  • @reaperfs2371
    @reaperfs23712 жыл бұрын

    How are you running the tool without sudo? Mine won't run without and just spits out "openFd: permission denied"

  • @GavinFreeborn

    @GavinFreeborn

    2 жыл бұрын

    If I want to restart it I run `killall kmonad`

  • @FrankCastiglione
    @FrankCastiglione Жыл бұрын

    Hello. I'm not a programmer, but I'm interested in improving my ergonomics. But first, I need to install Kmonad and I don't know how to do that. Can you guys help me? I use qutebrowser and did the Vim tutorial. But I'm just a graphical environment user. I don't know many terminal commands (I usually follow tutorials, copying and pasting) and I don't have much familiarity with projects that need to be compiled (unless they have a step-by-step documentation for "dummies". I use Pop!_OS 22.04 LTS. Could you let me know what I need to learn to do the Kmonad installation? My goal is to set up several layers, for example: leave one of them for a numeric keyboard, just as shown in the video. Thank you!

  • @linuxramblingproductions8554

    @linuxramblingproductions8554

    Жыл бұрын

    Sudo apt install kmonad probably if that doesn’t work use whatever command it says to use on there site also just read the docs you don’t need to be a programmer lol

  • @chikkenvoicesinmyhed
    @chikkenvoicesinmyhed2 жыл бұрын

    I would love to know where the config file is (linux) if anyone can help. Trying to run the binary seems to do nothing (maybe it is supposed to do nothing until I can make changes). I am still trying to find a starting point past downloading the binary.

  • @orelsberg2781

    @orelsberg2781

    2 жыл бұрын

    It's in the repo's docs

  • @DaraulHarris
    @DaraulHarris3 жыл бұрын

    11:34 rekt 🤣🤣

  • @toddkfisher
    @toddkfisher Жыл бұрын

    Is that a hotplate behind you?

  • @GavinFreeborn

    @GavinFreeborn

    Жыл бұрын

    Haha yes it is

  • @nutelhere
    @nutelhere9 ай бұрын

    Kmonad is great, however it's sadly not developed anymore. There's a very similar tool called kanata, and it's basically a rust rewrite of kmonad, that fixes some of kmonad's issues and it's actively developed.

  • @GavinFreeborn

    @GavinFreeborn

    9 ай бұрын

    Are you sure? It seems to have commits as recent as two weeks ago. That said there is an unanswered issue for creating a new release less than a month ago. Either way it's great to hear of another project. I will have to give it a look

  • @nutelhere

    @nutelhere

    9 ай бұрын

    @@GavinFreeborn Yeah. Most of the recent commits are only improving non-code stuff like docs. Last code update was committed on Jan 6.

  • @jakobfrei1121
    @jakobfrei11218 ай бұрын

    4:18 "In case you're not familiar with Haskell, it's not super important for this video" Stopped watching right there

  • @gotbletu
    @gotbletu3 жыл бұрын

    looks complicated, i quit for now =)

  • @freekaleek12100
    @freekaleek121007 ай бұрын

    Hi @gavin - thanks for the tutorial looks like a very cool tool! I'm getting the same error I think you may have gotten off camera at 14:20 in the video. I.e. "kmonad: Could not perform IOCTL grab on: /dev/input/by-path/platform-i8042-serio-0-event-kbd" when trying to implement the capsasa layer. Any chance you remember how you went about resolving it?

  • @GavinFreeborn

    @GavinFreeborn

    7 ай бұрын

    If I recall I had multiple instances of kmonad running so all I needed to do was run `killall kmonad` and the command worked. If that isn't the case for you there may be another tool already attempting to grab control of your keyboard. Possibly another hotkey daemon?

  • @VS-nq1ro
    @VS-nq1ro Жыл бұрын

    I tried it for Ubuntu and it didn't work for me...

  • @GavinFreeborn

    @GavinFreeborn

    Жыл бұрын

    Did you get a permissions error? There is an faq that does a good job at covering the common problems people have.