Results 1 to 4 of 4

Thread: customize keybaord layout (also ctrl key combos)

  1. #1
    Join Date
    Dec 2020
    Beans
    11

    customize keybaord layout (also ctrl key combos)

    I already know I can go to
    Code:
     /usr/share/X11/xkb/symbols
    for remapping keyboard.
    How can I create CTRL+key combinations.... for example CTRL+n = Ů

    I would prefer if there is a way staying inside the layout file so if I reinstall the OS I don't need to modify multiples system files, but if there is
    no way to do that inside the layout file... it's ok


    thanks

  2. #2
    Join Date
    Dec 2020
    Beans
    29

    Re: customize keybaord layout (also ctrl key combos)

    Have you looked at using the ~/.XCompose file to do this?
    I used this to add the ability to enter Greek characters from the keyboard.
    Useful info here:
    https://askubuntu.com/questions/7871...th-compose-key
    https://wiki.debian.org/XCompose

  3. #3
    Join Date
    Dec 2014
    Beans
    1,696

    Re: customize keybaord layout (also ctrl key combos)

    If I were you I'd leave the system files alone because you'd have to redo your modifications whenever an update to the system files happens. There is a command to remap keys called xmodmap (this is for X11, I don't know how to do it on Wayland). See 'man xmodmap' for details. Please note that 'ctrl-whatever' produces control-characters which are used by many programs as shortcuts. 'ctrl-n' is for examples used in a lot of programs as 'New File' and in emacs as 'next-line' (basically 'cursor down', it's an alternate key meant for keyboards that don't have cursor control keys). So I'd probably map the character you want to AltGr-n (and the capital variant to Shift-AltGr-n).

    Holger

  4. #4
    Join Date
    Dec 2020
    Beans
    11

    Re: customize keybaord layout (also ctrl key combos)

    my intention is to get ÷ through CTRL+[
    in some rows you can see:
    Code:
    <dead_diaeresis> <O>                 : "÷"   Odiaeresis # LATIN CAPITAL LETTER O WITH DIAERESIS
    <Multi_key> <quotedbl> <O>           : "÷"   Odiaeresis # LATIN CAPITAL LETTER O WITH DIAERESIS
    <Multi_key> <O> <quotedbl>         : "÷"   Odiaeresis # LATIN CAPITAL LETTER O WITH DIAERESIS
    <Multi_key> <diaeresis> <O>         : "÷"   Odiaeresis # LATIN CAPITAL LETTER O WITH DIAERESIS
    <Multi_key> <O> <diaeresis>         : "÷"   Odiaeresis # LATIN CAPITAL LETTER O WITH DIAERESIS
    which should I modify and how?
    once I modified the file I can reboot and everything works right?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •