#StackBounty: #debian #tty #keyboard-layout #console #scrolling Scrolling TTY without dedicated PgUp and PgDown

Bounty: 200

My keyboard does not have separate PgUp and PgDown keys.
They are in the numpad, sharing their position with KP_9 and KP_3.

Keypad picture

Scrolling terminals with Shift+Pg{Up,Down} was not possible either with
Numlock on or off.

Since I don’t care for the keypad numbers but do care a lot for scrolling,
I have successfully remapped them in X11 to "Prior" and "Next" regardless
of Numlock state, and now Shift+{PgUp,Down} both work in Xterm.

However, I can’t achieve the same in the TTY.

Original keycodes

As of showkeys:

KP_3/KP_PgUp   = 73
KP_9/KP_PgDown = 81
Slash          = 89
Right Shift    = 54

As of dumpkeys:

PgUp   = 104
PgDown = 109

Slash and Right Shift were also listed because I will also swap them just
for testing.


  • Modified /etc/console-setup/remap.inc to exactly this:
    keycode 73 = Prior
      shift keycode 73 = Scroll_Backward
      shift shiftl  keycode 73 = Scroll_Backward
      shift shiftr  keycode 73 = Scroll_Backward
      shift shiftl  shiftr  keycode 73 = Scroll_Backward
      shift ctrll keycode 73 = Scroll_Backward
      shift shiftl  ctrll keycode 73 = Scroll_Backward
      shift shiftr  ctrll keycode 73 = Scroll_Backward
      shift shiftl  shiftr  ctrll keycode 73 = Scroll_Backward 
    keycode 81 = Next
      shift keycode 81 = Scroll_Forward
      shift shiftl  keycode 81 = Scroll_Forward
      shift shiftr  keycode 81 = Scroll_Forward
      shift shiftl  shiftr  keycode 81 = Scroll_Forward
      shift ctrll keycode 81 = Scroll_Forward
      shift shiftl  ctrll keycode 81 = Scroll_Forward
      shift shiftr  ctrll keycode 81 = Scroll_Forward
      shift shiftl  shiftr  ctrll keycode 81 = Scroll_Forward  
    keycode  89 = Shift
    keycode  54 = slash
      shift keycode  54 = question
      altgr keycode  54 = degree
      shift altgr keycode  54 = questiondown
  • Followed the instructions of How to change console keymap in Linux?.
    dumpkeys > pageupdown

    Then swapped

    keycode 73  keycode 104
    keycode 81  keycode 109
    keycode 54  keycode 89

    in that file and issued loadkeys -s pageupdown.


In both experiments,

  • Although the two keypad keys don’t print numbers anymore and PgUp still
    works (it scrolls in less) as desired, Shift+PgUp does not scroll the TTY.
  • Right Shift and Slash have been correctly swapped.

Additional notes

  • Toggling Numlock does not help in any of the configurations. The Fn key
    also does not have any effect in those keys.
  • I have also tried mapping more
    ordinary keys, namely l and p, to the Page actions, without success.
  • If it helps in any way, this is the XKB map that works in the X session:
    partial keypad_keys
    xkb_symbols "noKPNumbers" {
        key  <KP9> {  [  Prior,   Prior   ]   };
        key  <KP3> {  [  Next,    Next    ]   };

How can I map the keypad PgUp and PgDown keys in such a way that Shift+Pg{Up,Down}
scroll the TTY buffer? Is it possible at all?

Get this bounty!!!

#StackBounty: #x11 #keyboard-shortcuts #keyboard-layout xmodmap: set Alt keys to simultaneously behave as normal Alt and as level chooser

Bounty: 50

I’d like to know if it’s possible to set both Alt keys to behave simultaneously as Alt and as the third-level chooser (AltGr). I’ve mapped several special characters I often use under some combination of AltGr+char and so would like to be able to use both the left and right Alt keys as the third-level choosers, but if I map both keys to AltGr I lose the functionality of Alt, which I also need.

Get this bounty!!!

#StackBounty: #boot #debian #keyboard-layout #livecd #time-zone Incomplete Debian live localisation

Bounty: 50

I have a live installation of Debian 10.6.0 amd64, burnt on a DVD-RW using imgBurn, for school and I need it to be easily available in italian without much hassle.

If I boot it using its italian localisation support though, while the language is for the most part right (many parts still remain in english) the keyboard is set to US by default and I have to change it to IT everytime, same thing for the timezone, which is set to London and it winds the clock back two hours, which not only affects the clock of the BIOS but my Windows 10 installation’s as well (which I now have to synchronize everytime after I’m done with Debian).

I tried downloading the iso again multiple times, switch to a USB installation, disabling Secure Boot or enabling Legacy Mode, but they all give the same result.

What can I do to make it boot with the right keyboard layout and correct timezone at least, everytime I boot it, without having to run command lines each time?

Get this bounty!!!

#StackBounty: #shortcut-keys #keyboard-layout #key-binding How to configure macOS-like text navigation shortcuts in ubuntu (delete word…

Bounty: 100

I use a macOS for work doing technical writing, and I’ve recently got an Ubuntu desktop at home (20.04). I’m using the same external keyboard for both, and the biggest thing I struggle with is that I’m so used to using the following macOS hotkeys:

  • Alt+Backspace – delete word on the left (I realize that this can be achieved by +Backspace, but I’d prefer if everything was the same across OSs)
  • Alt+Left/Right – move cursor one word left/right (including the +Shift combo to select&move)
  • +Backspce – delete line left
  • +Left/Right – move cursor to start/end of line (including the +Shift combo to select&move)

Whenever I have to use a Windows machine, I reconfigure it using AutoHotkey to give the macOS-like shortcuts. is there an equivalent way that I can adjust these settings on a system-wide basis for Ubuntu?

(and no, Vim is not an option 🙂 )

Get this bounty!!!

#StackBounty: #key-bindings #keyboard-layout Recording and playing macros with langmap activated

Bounty: 50

Thank you for your interest in this rather specialized question.

This is a follow-up to this question : Mapping for expression register with langmap active

I’m looking for the best way to associate two different keymaps in (Neo)vim, one to input text (bépo in my case) and US Qwerty for all the other commands.


1- When using langmap, is it possible to replay the same characters as recorded by the macro instead of the same keys ?

2- Alternatively, when using keymap, is it possible on Arch Linux, ST terminal and Neovim to map chords such as CTRL + ALT + A (more specifically AltGr / right Alt) when using a qwerty layout ?

3- If nothing else, could a macro enable transparent switching between OS keymap upon entering and exiting insert / find mode ?

Full story

I have learnt VIM by using the game VIM adventures, this made me use the US layout for normal commands which seemed a reasonnable choice, albeit a bit daunting at first as I needed to switch mentally between two layouts for inputting text to qwerty for the commands.

I could actually get used to it, but configuring (neo)vim has never been fully satisfying as I am encountering limitations while improving my vim-fu.

My journey so far:

  • Solution 1 : remap every character combination, using noremap, nnoremap etc.
    • advantages : the mappings are generally simple to implement
    • disadvantages :
      • really tedious to maintain and expand when learning new commands
      • does not display the intended key in the status line triggered by the showcmd option :h showcmd
  • Solution 2 : langmap. :h langmap
    • Advantages
      • much easier to maintain, as simple correspondance list is required

      • displays the intended command key in the status line (translation is done by Vim)

      • by configuring some remap just for insert mode, I could keep the same behavior for insert mode and make shortcuts such as ctrl + W delete the word backward for instance.

      • For now, I mostly use command line mode for substitution so inputting commands in fr layout is not disturbing as I input words rather than commands.
    • Disadvantage
      • Macros are recorded with qwerty like-layout, but replays with my locale layout, ie fr-bepo. That make them unusable.
  • Solution 3 : keymap :h keymap

    • Advantages
      • With keymap, the OS keymap is set to Qwerty, so the responsability to change on locale keymap rests upon Vim when entering Insert and Search modes, and Vim is in charge of translating the keypresses from QWERTY to the target locale keymap.

      • From what I could test, this is perfect as every normal mode command is of course using the US layout natively and I really wish this could work BUT

    • Disadvantage

      • My locale keymap makes a really heavy use of the CTRL + ALT (aka AltGr) modifier which is also combined with SHIFT (Shift + AltGr). From what I’ve read, it is not possible to use this chording in Vim but may work with certain terminals in Neovim. I could not find my way through this, does anybody have succeded make this work ? I use Arch, btw 😉 and ST as Terminal.
  • Solution 4 : automatically switch OS keymap for normal mode
    • This could be the most simple solution, and the one I should have used before it seems.

:!setxkbmap us works well, but I could not yet find from the help the autocmd function that would enable this workflow :

  • upon starting Vim: switch to Qwerty layout

  • normal mode, search character (triggered by f/F/t/T): switch to fr-bepo layout

  • exit search: back to Qwerty

  • enters insert mode: fr-bepo

  • back to normal mode : Qwerty

  • exit Vim : back to fr-bepo

Thanks a lot for your reading !

Get this bounty!!!

#StackBounty: #keyboard #xubuntu #keyboard-layout Install Dvorak International

Bounty: 50

I would like to install the following Dvorak International Keyboard Layout.

I have tried adding the file to /usr/share/X11/xkb/symbols/

and editing the file xfree86.xml but it is not selectable in xubuntu.

Is there a place I can file this as a bug? Ideally this should be modified to be just like Macs such that you simply need to drop in the file.

// Dvorak interational extended keyboard layout for linux
// version 1.01
// http://arjenvankol.com/dvorak.php
// Install instructions:
// Copy this file to your /etc/X11/xkb/symbols/pc directory.
// You may need root privileges to do so.
// Add the following line to /etc/X11/xkb/rules/xfree86.lst
// dvorak_intl  Dvorak international extended
// In order to make the keyboard layout available in GNOME,
// you should also modify /etc/X11/xkb/rules/xfree86.xml
// accordingly (this is an XML file and the format is mostly
// self-explanatory).
// 2007/12/19 23:25 +0100 Arjen van Kol

partial default alphanumeric_keys
xkb_symbols "basic" {

    name[Group1]= "Dvorak international extended";

    // Alphanumeric section

    key <TLDE> { [       dead_grave, dead_tilde ]   };

    key <AE01> { [      1,  exclam, exclamdown, U00B9 ] };
    key <AE02> { [      2,  at, U00B2 ]     };
    key <AE03> { [      3,  numbersign, U00B3 ] };
    key <AE04> { [      4,  dollar, currency, U00A3 ] };
    key <AE05> { [      5,  percent, EuroSign ] };
    key <AE06> { [      6,  dead_circumflex, U00BC ]};
    key <AE07> { [      7,  ampersand, U00BD ]  };
    key <AE08> { [      8,  asterisk, U00BE ]   };
    key <AE09> { [      9,  parenleft, U2018 ]  };
    key <AE10> { [      0,  parenright, U2019 ] };
    key <AE11> { [ bracketleft, braceleft, guillemotleft ] };
    key <AE12> { [ bracketright, braceright, guillemotright ] };

    key <AD01> { [  dead_acute, dead_diaeresis, U00E4, U00C4 ] };
    key <AD02> { [  comma,  less, U00E5, U00C5 ]    };
    key <AD03> { [      period, greater, U00F6, U00D6 ] };
    key <AD04> { [      p,  P, paragraph, degree ]  };
    key <AD05> { [      y,  Y, U00FC, U00DC ]   };
    key <AD06> { [      f,  F       ]   };
    key <AD07> { [      g,  G, U00E7, U00C7 ]   };
    key <AD08> { [      c,  C, copyright, U00A2 ]   };
    key <AD09> { [      r,  R, registered   ]   };
    key <AD10> { [      l,  L       ]   };
    key <AD11> { [  slash,  question, questiondown ]};
    key <AD12> { [  equal,  plus, U00D7, U00F7 ]    };

    key <AC01> { [      a,  A, U00E1, U00C1 ]   };
    key <AC02> { [      o,  O, U00E5, U00C5 ]   };
    key <AC03> { [      e,  E, U00E9, U00E9 ]   };
    key <AC04> { [      u,  U, U00FA, U00DA ]   };
    key <AC05> { [      i,  I, U00ED, U00CD ]   };
    key <AC06> { [      d,  D, U00F0, U00D0 ]   };
    key <AC07> { [      h,  H       ]   };
    key <AC08> { [      t,  T, U00FE, U00DE ]   };
    key <AC09> { [      n,  N, U00F1, U00D1 ]   };
    key <AC10> { [      s,  S, ssharp, section ]    };
    key <AC11> { [  minus,  underscore, yen ]   };
    key <BKSL> { [  backslash, bar, U00AC, brokenbar ]  };

    key <AB01> { [   semicolon, colon,ae, AE ] };
    key <AB02> { [      q,  Q, U00F8, U00D8 ]   };
    key <AB03> { [      j,  J       ]   };
    key <AB04> { [      k,  K       ]   };
    key <AB05> { [      x,  X       ]   };
    key <AB06> { [      b,  B       ]   };
    key <AB07> { [      m,  M, U00B5    ]   };
    key <AB08> { [      w,  W       ]   };
    key <AB09> { [      v,  V       ]   };
    key <AB10> { [      z,  Z       ]   };

    include "level3(ralt_switch)"

Get this bounty!!!

#StackBounty: #keyboard-layout xrdp: Super_L not working

Bounty: 100

My virtual machine runs xrdp and when I connect with rdesktop, the “windows” key (i.e. Super_L) is not assigned properly.

Using xev I see that when the windows key is pressed, instead of showing Super_L, it shows Control_L. The real CTRL key also shows Control_L.

In other words, both the windows key and CTRL have the same effect.

How can I fix this, so that the Windows key maps to Super_L, same as on my laptop?

Get this bounty!!!

#StackBounty: #18.04 #keyboard #shortcut-keys #keyboard-layout #xkb Remap two keys for one application only

Bounty: 100

I am using NoMachine to connect remotely to a Mac. Unforunately NoMachine doesn’t provide a way to map keys on it’s own.

While I am using NoMachine I’d like to swap my Control and ‘Meta’ (Windows) keys. That will mean pressing control on my keyboard will result in command () key being sent to the Mac so I can copy paste properly.

What is the simplest way to do this? I have seen large tutorials for XKB but no simple guide to do this for Ubuntu 18.04.

Get this bounty!!!

#StackBounty: #keyboard #libreoffice #keyboard-layout #google #internationalization How to use a virtual keyboard inside Libre Office W…

Bounty: 500

My current laptop has a standard (QWERTY) English-Hebrew keyboard that came with my Dell Latitude laptop; nothing is customized.

I need to use Thai letters in general and in a Libre Office Writer (LBW) document in particular.

My problem

I thought to install a Google Virtual Keyboard but I am not sure output would automatically be inside a document edited with LBW.

My question?

How to use a virtual keyboard inside Libre Office Writier?

That is to ask; This Gmail solution seems nice but how could I implement this or similar FOSS and Gratis solution (not necessarily by Google) in the OS layer?

Get this bounty!!!