#StackBounty: #freebsd #keyboard-shortcuts #keyboard #keyboard-layout Configuring kbdmap on FreeBSD for Meta+Left/Right key combinations

Bounty: 50

I have a FreeBSD 12.1 installation, and the problem is that on a syscons or vt virtual terminal (rather than, say, an XTerm emulated terminal), both the keys ← Left and ⎇ Alt+← Left (and the same for → Right) get mapped to the same escape sequence: <ESC>[D (I have verified this using the showkey utility).

However, this means that within the shell, ← Left and ⎇ Alt+← Left perform the same actions (move left by one character), and no configuration of .inputrc can change that (so that ⎇ Alt+← Left moves left a whole word).

Now, I believe that kbdmap can help solve this issue, but I have no idea how to correctly configure it. There seems to be some information here, but it makes no sense to me whatsoever.

Get this bounty!!!

#StackBounty: #debian #virtualbox #keyboard-shortcuts #virtual-machine #keyboard-layout setxkbmap -option ctrl:nocaps does not map Caps…

Bounty: 50

I am using Xfce 4.12 on Debian 10 running inside Oracle VirtualBox 6.1 running on macOS Catalina.

All my key mappings are set to default on macOS. (System Preferences > Keyboard > Modifier Keys > Restore Defaults > Ok.)

caps to escape works fine

In the Debian VM, I run:

$ setxkbmap -option
$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     us

$ setxkbmap -option caps:escape
$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     us
options:    caps:escape

Now caps lock behaves like escape in the Debian VM and caps lock behave like caps lock on the macOS system. This is working as expected.

caps to control does not work fine

In the Debian VM, I run:

$ setxkbmap -option
$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     us

$ setxkbmap -option ctrl:nocaps
$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     us
options:    ctrl:nocaps

Now Caps Lock does not behave like Ctrl inside the Debian VM. It still behaves like Caps Lock. What went wrong?

Get this bounty!!!

#StackBounty: #windows #linux #osx #keyboard-shortcuts How can I quickly view a list of application-specific keyboard shortcuts on all …

Bounty: 100

I’m looking for a standalone program or OS utility that will quickly list an application’s keyboard shortcuts to help teach digital fluency.

I haven’t quite found any individual programs or utilities that allow a user to quickly see the available keyboard shortcuts that are registered in the application they are currently using such as an internet browser, word processor, or IDE for example. The closest program I’ve found is a MacOS program called "CheatSheet" which will list each shortcut listed in the menu bar.

CheatSheet on MacOS

I’d like to take any arbitrary application on Windows, MacOS, or Linux distro and view the shortcuts registered in the top menu typically found on the top of an application’s screen on all OS (Windows, MacOS, Ubuntu(Linux), etc).

Here’s an example of Visual Studio on Windows:

File Menu in Visual Studio on Windows

Here’s an example of Open Office Writer on Ubuntu:

View Menu in Open Office Writer on Ubuntu

Below are the closest alternatives I’ve found, in which many support system-level keyboard shortcuts instead of application-specific keyboard shortcuts.

Is there a cross-platform standalone program or OS-specific utility that currently does this?

If not, are there OS-specific APIs available on each platform to create a program that does this similar to MacOS’s CheatSheet?

Get this bounty!!!

#StackBounty: #windows #keyboard #keyboard-shortcuts Windows shortcuts inserting last stroked key

Bounty: 50

When I use any of the shortcuts in my system, it first insert my last stroked key belongs to that shortcut. I also tried 4 diffirent keyboard models in my laptop, but its still same.

For example if I copy "Hello World!" text with CTRL + C and then paste it with CTRL + V, it writes V key before the copied text, pasted text becoming "vHello World!".

Another example is, if I select "Hello World!" text with CTRL + A key and then stroke SPACE (or any key) in my keyboard, it writes the A key.

This is so annoying… Here is my hardware and software specifications,

  • System Model: HP ZBook Studio G5
  • Operating System: Windows 10 Pro 64-bit (10.0, Build 18363)
  • BIOS: Q71 Ver. 01.11.03

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: #vim #keyboard-shortcuts #emmet Why is mapping <c-e> to expand emmet-vim abbreviation not working?

Bounty: 100

I have the following in my _vimrc and _gvimrc (I’m using Windows 10):

set tabstop=4
set sts=4
set expandtab
set softtabstop=4
set shiftwidth=4
set number    
let g:emmet_html5 = 1
let g:user_emmet_expandabbr_key = '<c-e>'

When I edit an HTML file with Vim, I want to be able to expand an abbreviation with Ctrle.

But, when I hit Ctrle, it doesn’t expand. When I hit Ctrly, (the default mapping), it does expand.

Why is let g:user_emmet_expandabbr_key = '<c-e>' not taking effect?

No mapping found for map <c-e>.
enter image description here

I am sure that mapping was written into _vimrc and _gvimrc.

Display all scriptname:
enter image description here

My installation:

  • Download gvim8.2.exe from gvim.exe and double click to install on d: partition.
  • Download emmet-vim-master from emmet-vim-master and extract all files in it.
    • copy all files and directory in emmet-vim-master/autoload/ into d:Vimvim8.2autoload.
    • copy file in emmet-vim-master/plugin/ into d:Vimvim8.2plugin.

Then rewrite the _vimrc file.

Get this bounty!!!

#StackBounty: #x11 #xorg #keyboard-shortcuts #keyboard #i18n Why can't I type a g̃?

Bounty: 100

My language, Guarani, uses G̃/g̃ to denote the nasalized velar approximant. I thought I’d be able to type it by combining a dead tilde with g, but this does not work. Why doesn’t it, and how can I fix it?

My main suspicion is that this has to do with the fact that there is no separate unicode character for g̃, just g with the combining tilde. I can type ỹ and ṽ just fine, but not j̃, r̃, m̃, which seems like good evidence that therein lies the problem.

So one way I could get around this would be to map a key to 0x1000303 (which is U+0303, or ◌̃ ), the combining tilde, instead of to dead_tilde. However, this creates several problems:

  • If I switch to using the combining tilde in all cases:
    • I end up typing e.g. n + ◌̃ in many cases where the single character ñ is expected, and they have different results. For example, I’ve noticed that certain websites won’t display the same search results if I type one vs. the other (obviously that’s on them, but I want a keyboard layout that works with the world as it exists now).
    • It’s annoying that I have to backspace twice to delete characters with the combining tilde, which I can accept if it’s only for the g̃, but it’s a little much with every nasalized character.
  • If I add both, which is what I’m currently doing, this becomes really hard for usability, because:
    • I have to think in each case about which key to use, when my brain thinks of them as the same
    • The mechanics of typing the two are different, since dead_tilde is pressed before a character, whereas ◌̃ goes after. My poor little brain will never get used to that.

It seems like in the ideal scenario I’d have X notice that dead_tilde + g doesn’t work and just process it as if I’m typing g + ◌̃, and enter the two characters for me together, as it does for ñ, ã, ẽ, ĩ, õ, ũ, ỹ, etc.

It’s worth noting that it’s not possible to get around this by adding the g̃ directly to my keyboard layout, as xkb doesn’t seem to support mapping a key to a combined unicode glyph (though see the answer to Custom xkb layout in which one key creates two unicode code points for a hacky workaround). If I could fix that, I suppose this would be much less of a problem.

I’m running Ubuntu 18.04, not sure what other background info would be helpful, but I assume this is a problem for anyone running X.

Edit 1: Editing Compose mappings doesn’t work

Another thing I’ve tried, which also did not work, is editing the Compose mappings to add a composed g̃. I wrote an .XCompose file as follows:

include "%L"

<dead_tilde> <g> : "g̃" gtilde
<dead_tilde> <G> : "G̃" Gtilde

But this also did not work, I assume for the same reason above: X expects a single character, and g̃ is technically two. Incidentally, I noticed a number of mappings shipped in my locale’s default Compose file also don’t work, presumably for the same reason. The following mappings for en_US.UTF-8, and perhaps many more, actually do nothing:

<dead_acute> <dead_tilde> <a>       : "ã́"   # LATIN SMALL LETTER A WITH TILDE AND ACUTE
<dead_grave> <dead_tilde> <a>       : "ã̀"   # LATIN SMALL LETTER A WITH TILDE AND GRAVE
<dead_acute> <dead_tilde> <A>       : "Ã́"   # LATIN CAPITAL LETTER A WITH TILDE AND ACUTE
<dead_grave> <dead_tilde> <A>       : "Ã̀"   # LATIN CAPITAL LETTER A WITH TILDE AND GRAVE
<dead_acute> <dead_tilde> <e>       : "ẽ́"   # LATIN SMALL LETTER E WITH TILDE AND ACUTE
<dead_grave> <dead_tilde> <e>       : "ẽ̀"   # LATIN SMALL LETTER E WITH TILDE AND GRAVE
<dead_acute> <dead_tilde> <E>       : "Ẽ́"   # LATIN CAPITAL LETTER E WITH TILDE AND ACUTE
<dead_grave> <dead_tilde> <E>       : "Ẽ̀"   # LATIN CAPITAL LETTER E WITH TILDE AND GRAVE
<dead_acute> <dead_tilde> <i>       : "ĩ́"   # LATIN SMALL LETTER I WITH TILDE AND ACUTE
<dead_grave> <dead_tilde> <i>       : "ĩ̀"   # LATIN SMALL LETTER I WITH TILDE AND GRAVE
<dead_acute> <dead_tilde> <I>       : "Ĩ́"   # LATIN CAPITAL LETTER I WITH TILDE AND ACUTE
<dead_grave> <dead_tilde> <I>       : "Ĩ̀"   # LATIN CAPITAL LETTER I WITH TILDE AND GRAVE
<dead_grave> <dead_tilde> <o>       : "õ̀"   # LATIN SMALL LETTER O WITH TILDE AND GRAVE
<dead_grave> <dead_tilde> <O>       : "Õ̀"   # LATIN CAPITAL LETTER O WITH TILDE AND GRAVE
<dead_grave> <dead_tilde> <u>       : "ũ̀"   # LATIN SMALL LETTER U WITH TILDE AND GRAVE
<dead_grave> <dead_tilde> <U>       : "Ũ̀"   # LATIN CAPITAL LETTER U WITH TILDE AND GRAVE
<dead_grave> <m>                    : "m̀"   # LATIN SMALL LETTER M WITH GRAVE
<dead_grave> <M>                    : "M̀"   # LATIN CAPITAL LETTER M WITH GRAVE

As a matter of opinion, I do not think this is what we should fix: adding an extra line to Compose files for every possible diacritic just seems wasteful, and is not taking advantage of the simplicity of the nice combining diacritics Unicode wants us to use.

Get this bounty!!!

#StackBounty: #bash #terminal #keyboard-shortcuts Why does exiting Python REPL clear my Ctrl-V Bash mapping?

Bounty: 50

I have mapped Ctrl-V in my .bash_profile to a function that opens a file in Vim using fzf. It works perfectly, but whenever I exit from the Python REPL the mapping doesn’t work until I source my .bash_profile twice or start a completely new shell session.

Steps to reproduce:

  1. Use this minimal .bash_profile that replicates the problem:
stty lnext ^-
bind -x '"C-v": "echo mapping works"'
  1. Start a Bash session.

  2. Press Ctrl-V -> see the output mapping works.

  3. Run $ python3.

  4. Use exit() or Ctrl-D to exit the REPL.

  5. Ctrl-V is back to it’s default behavior.

  6. $ source ~/.bash_profile the mapping still doesn’t work?

  7. $ source ~/.bash_profile now Ctrl-V correctly produces mapping works, how?

Why does starting/exiting the Python REPL affect my Ctrl-V mapping (this does not happen to my other mappings)? And why do I need to source my profile twice for the mapping to start working?

Get this bounty!!!