date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,403,565,920,000 |
I want to automate my typing. I can use window managers such as gnome and fvwm.
I can access to ubuntu and obsd.
|
There are several tools to simulate a key press, for example xdotool. Although the underlying interface uses keycodes, xdotool does the job of translating keysyms back into keysyms, which is usually very convenient.
If you really need to specify a keycode, I don't know of a command line utility for that, but you can write a small C or python or $favorite_language program¹. Again, you almost always want to specify keysyms, not keycodes.
To do something every minute, either put it in a crontab, or write a shell loop (you probably want the latter, so you can kill it easily):
while sleep 60; do xdotool key A; done
¹ I might be able to dig up some Python if there's demand.
| How can I press key of "keycode 53" every minute in X? |
1,403,565,920,000 |
At some point around late 2008 to early 2009, some keycode values (apparently, for the keys that weren't on an XT keyboard) on a standard PC keyboard when running X.org under Linux changed. I don't know whether this was due to a kernel change or an X change. Debian lenny and Ubuntu 8.04 used the old assignment; Debian squeeze and Ubuntu 10.04 used the new assignment.
So I have two xmodmaprc files, one with the old keycodes and one with the new keycodes. How do I determine which one to load from my .xinitrc and .xsession?
I want my startup files to be portable with no hassle, so I want to get rid of my present dependency on the machine name (!). And I don't want to introduce a dependency on Linux distribution versions (and anyway that would be information about the client, but it's information about the server that I need). I already have information about the server at this point in my script (all the symbols listed in xrdb(1) are available as environment variables); hopefully my question reduces to “What parameters to I compare to what values?”.
Note that since I want my startup files to work on machines that I don't administer, keysym reassignments alone are no help. For example, I want to assign my favorite modifier to the Win keys, but I can't predict what keysym will be assigned when I log in. However, if there is an XKB concept I can use in place of keycodes (and is independent of any sysadmin customization, so keysyms won't do), I'm willing to switch to XKB.
|
You can find out the keycode of a key through XKB, for example
xkbcomp -a -dflts -xkb $DISPLAY - | sed -ne 's/^ *<LWIN> *= *\([0-9][0-9]*\).*/\1/p'
| Determining keycode assignments for X.org on a PC |
1,403,565,920,000 |
[This is a repost from Ubuntu Ask, as as I'm actually on Linux Mint 20.2 and therefore this question belongs in this site]
I've had a dual boot on two hard drives with Windows 10 and Linux Mint for quite a while, and recently changed my GPU. After updating the drivers on both OS, I encounter this issue on GRUB: pressing Enter works, allowing me to boot on Mint, but pressing down goes (almost) immediately to the last item in the menu, and then GRUB becomes unusable. It's as if the down key was hold instead of being just pressed once! Trying any other key gives the same result. I also tried "c" to open a terminal, and indeed the "c" letter is then spammed in the prompt. Although not eternally: it stops after a while. Typing any letter then gives the same result, it appears 15 or 20 times in the terminal, then it stops. Unfortunately the GRUB menu is forever stuck as soon as a key is pressed (other than Enter).
I've done a bit of research, but the only discussion I found that resemble those symptoms is this one on launchpad. (most of the cases, discussion about keyboard in GRUB are about keyboard not being detected at all). The problem has been here for quite a while it seems, and is reported only once a year. I've provided a bit of information there as well.
What I've tried so far is:
Switching my USB keyboard from a USB3 to a USB2 port
Disabling the Legacy USB support in the BIOS
Disabling XHCI in BIOS
Purging and Re-installing GRUB (through boot-repair)
None of those solutions had any effect. Although sometimes, I've been able to use GRUB! It gave me the impression to have fixed the issue, I think most of the times it was after I had change something? Unfortunately GRUB is still glitching after the next reboot, and I have been unable to consistently reproduce this glimpse of hope.
Next I might try to update my BIOS itself. I strongly suspect the AMD driver manager on Windows to have done something to it. Not sure yet when I'll have the time to do it, I'll update you once it's done (hopefully the operation will be successfull).
Anyway, here are some info on my system:
Results of the command sudo dmidecode (only BIOS related entry)
Last BootInfo from boot-repair: sda is Windows, sdb is Mint, sdc is for storage only
If you need anything more, please ask.
Update 17/09: I posted an answer clarifying the issue after some researches, see below.
|
I eventually solved it!
I did a CMOS clear on the motherboard, then plugged my keyboard on a USB2 port.
For people having this issue in the future, the first step might be optional. In my case I probably had some hardware malfunction.
Also something important to note: switching USB port while grub is running has no effect! I had to reboot before trying again, and only then it worked (I actually did 5 attempts to be sure and confirm that the case was closed).
More details on the Linux Mint forums.
| Keyboard too sensitive in GRUB because of high framerate (Mint 20.2) |
1,403,565,920,000 |
I'm using KVM/QEMU on Ubuntu 22.04 and running Windows 10 as a guest VM. I am using virt-manager to connect to the VM.
I would like all shortcuts that use the "Windows key" to be processed by the host, not the guest. For example, Win+E should open my text editor in Linux, not the File Explorer in Windows.
But KVM is passing all these key presses to the Windows guest. This behavior is the same on all the window managers I have tried (Gnome, Sway, and Awesome WM). For reference, Virtualbox behaves the way I want with respect to the Windows key (but I'm trying to use KVM instead).
Any way to achieve what I want?
|
OK. I found a solution: in the host, the environment variable SPICE_NOGRAB should be set to 1.
| Passing "Windows key" shortcuts in the guest VM to the host computer with virt-manager |
1,403,565,920,000 |
all.
I run kernel 5.14.16-1 on Debian Testing.
My suspension sequence includes locking the screen with Xscreensaver. Everytime I resume from suspension, I have no keyboard; I do have trackpad mobility and therefore I can click on the "New Login" button on the prompt given by Xscreensaver; however, I still have no keyboard when I do this, so it's irrelevant. I've tried the solutions posted here (all of them) but they don't work; they all propose adding/removing kernel booting parameters.
Today I found this on dmesg:
[ 830.452644] i8042: Can't write CTR while closing AUX port
[ 830.999579] i8042: Can't reactivate AUX port
[ 831.003094] atkbd serio0: Spurious ACK on isa0060/serio0. Some program might be trying to access hardware directly.
Perhaps this can help me figure out what is going on, but searching for this term only returns the methods I've already tried.
Also, today I noticed that connecting a USB keyboard works; moreover, when I press any key on the USB keyboard, my laptop's starts working again.
Is there a way of automating this after resuming from suspension? That is, "fooling" the kernel into believing there is a USB keyboard and that a key was pressed in it?
Thanks!
|
Is your laptop's model Dell or VAIO?
If so, maybe your problem is related to Bug 195471.
It's a bug that has been present in the Linux kernel since a few years ago.
I have a VAIO laptop affected with that bug, and I have found two workarounds:
After resume to not press any key but Caps Lock, wait a couple of seconds until the Caps Lock LED turns on, and then my keyboard works normally.
If you're willing to compile the module yourself, take a look to this patched kernel module, it even includes a systemd service unit that restarts the driver after resume, so this is more a fix than a workaround, but I doubt it would be merged to upstream kernels as it seems that the models affected are not that many.
Hope this helps!
| No keyboard after suspension on Debian Testing |
1,403,565,920,000 |
I suspect this can't be done, but I would like to disable a specific key (namely '6' on the top row) on a specific keyboard (namely my laptop internal keyboard). The key is spamming 6s but is otherwise working (and I've ordered a replacement but it will take a long time due to location).
I am mostly using a USB keyboard but it is a pain to disable an entire keyboard (using xinput --float) just for one key.
So: is it possible to disable a specific key on a specific keyboard? I am using Kubuntu 19.10 although I suspect that is not important for this.
|
I would try this:
Use xev to find the keycode of the 6 key on your keyboard, "on mine it is 15". Then use xmodmap -e "keycode 15 = " where 15 is the number you found with xev. This will map that key to nothing. If that ends up not being persistent after reboot add that command to your startup apps.
If wanting for just one keyboard:
Install xkbcomp 1.2.0
Use xinput list find the specific keyboard id
Find the keycode for the key with xev.
FURTHER instructions at the link... https://superuser.com/a/869064/964775
To undo this operation you must remember or write down what xev gave you for the key and then just xmodmap it back to that.
I am fairly certain you could add this to your .profile or .bashrc file and have it be set for all terminals as well.
| Disable a specific key on a specific keyboard |
1,403,565,920,000 |
I use the following command in a bash script file:
xdotool type --clearmodifiers $(xclip -o -sel c)
I invoke it with a shortcut such as CTRL+SHIFT+e
The action works as expected. However, after it completes, the modifier keys remain pressed. That's the problem I need to resolve.
From the xdotool man page, the issue makes some sense:
CLEARMODIFIERS
Any command taking the --clearmodifiers flag will attempt to clear any active input modifiers during the command and restore them afterwards.
I wish they were not restored, but since they are, I need an additional command to clear those modifiers.
Background:
I tried adding these lines at the end of my script file:
xdotool keyup Control
xdotool keyup Shift
That resulted in me not being able to type or even use the mouse correctly.
I'm using KDE and X11. I use the US International keyboard layout and I have the following keyboard customizations set in KDE system settings:
both shift keys together enable caps lock and one shift key disables it
Caps Lock as Ctrl
|
Keydown messages for CTRL+SHIFT+e (the activator keystrokes) have already been sent and the keyup for the modifier keys do not get sent.
sleep 0.2
xdotool keyup Control_L Control_R Shift_L Shift_R
The actual key (e) may also have to be listed in keyup, but I do not have a problem excluding it.
The sleep command is not always needed, but placing it before every xdotool command helps speed issues because xdotool is fast.
| Release modifier keys after using xdotool |
1,403,565,920,000 |
Is there any way to customize your keyboard to set Shift+Spacebar+SomeLetter as an alternative for arrow keys? When editing text, I either use a mouse or arrow keys to take the cursor to a particular location within some line. Both methods are very restrictive as they make me lose my focus and slow me down.
If I am correct, using Shift+Spacebar has no particular allocation and it just prints the typical space. Combinations of Ctrl, Shift and Alt are often assigned to some other tasks. So it is good to be able to define such a shortcut globally. Is it possible (and do you recommend) to do that? I use Ubuntu 18.04 and I know how to set global commands for applications/programs, but I do not know how to accomplish this job (if possible).
This is how I can add shortcuts in Ubuntu.
|
Instead of Shift + Spacebar, I used Alt Gr.
Based on the accepted answer to this question, I created a keyboard layout based in the English (UK). If your keyboard is not English UK you might have to change the key codes in the file. This keyboard layout maps the arrow keys to
alt gr + s = left
alt gr + d = down
alt gr + f = right
alt gr + e = up
alt gr + t = prev page
alt gr + v = next page
alt gr + a = home
alt gr + g = end
alt gr + z = backspace
alt gr + w = delete
alt gr + q = escape
alt gr + r = insert
It also maps numbers to the right hand:
alt gr + n = 0
alt gr + m = 1
alt gr + , = 2
alt gr + . = 3
alt gr + j = 4
alt gr + k = 5
alt gr + l = 6
alt gr + u = 7
alt gr + i = 8
alt gr + o = 9
Copy the following text into a new file to /usr/share/X11/xkb/symbols/aa
// based on a keyboard map from an 'xkb/symbols/gb' file
default partial alphanumeric_keys
xkb_symbols "mylayout" {
// Describes the differences between a very simple en_US
// keyboard and a very simple U.K. keyboard layout defined by
// MyLayout
include "latin"
name[Group1]="MyLayout (UK)";
key <AE02> { [ 2, quotedbl, twosuperior, oneeighth ] };
key <AE03> { [ 3, sterling, threesuperior, sterling ] };
key <AE04> { [ 4, dollar, EuroSign, onequarter ] };
key <AC11> { [apostrophe, at, dead_circumflex, dead_caron] };
key <TLDE> { [ grave, notsign, bar, bar ] };
key <BKSL> { [numbersign, asciitilde, dead_grave, dead_breve ] };
key <LSGT> { [ backslash, bar, bar, brokenbar ] };
key <AD01> { [ q, Q, Escape, Adiaeresis ] };
key <AD02> { [ w, W, Delete, Aring ] };
key <AD03> { [ e, E, Up, Eacute ] };
key <AD04> { [ r, R, Prior, registered ] };
key <AD05> { [ t, T, Prior, THORN ] };
key <AD06> { [ y, Y ] };
key <AD07> { [ u, U, 7, Uacute ] };
key <AD08> { [ i, I, 8, Iacute ] };
key <AD09> { [ o, O, 9, Oacute ] };
key <AD10> { [ p, P ] };
key <AD11> { [ bracketleft, braceleft ] };
key <AD12> { [ bracketright, braceright ] };
key <AC01> { [ a, A, Home, Aacute ] };
key <AC02> { [ s, S, Left, section ] };
key <AC03> { [ d, D, Down, ETH ] };
key <AC04> { [ f, F, Right, F ] };
key <AC05> { [ g, G, End, G ] };
key <AC06> { [ h, H ] };
key <AC07> { [ j, J, 4, J ] };
key <AC08> { [ k, K, 5, OE ] };
key <AC09> { [ l, L, 6, Ooblique ] };
key <AC10> { [ semicolon, colon, ntilde, Ntilde ] };
key <AC11> { [ apostrophe, at, dead_acute, dead_diaeresis ] };
key <AB01> { [ z, Z, BackSpace, AE ] };
key <AB02> { [ x, X, Insert, X ] };
key <AB03> { [ c, C ] };
key <AB04> { [ v, V, Next, V ] };
key <AB05> { [ b, B, Next, B ] };
key <AB06> { [ n, N, 0, Ntilde ] };
key <AB07> { [ m, M, 1, mu ] };
key <AB08> { [ comma, less, 2, less ] };
key <AB09> { [ period, greater, 3, greater ] };
key <AB10> { [ slash, question ] };
include "level3(ralt_switch_multikey)"
};
Edit the following file: sudo gedit /usr/share/X11/xkb/rules/evdev.xml
before </layoutlist> add this text
<layout>
<configItem>
<name>aa</name>
<shortDescription>MyLayout (UK)</shortDescription>
<description>MyLayout (UK)</description>
<languageList>
<iso639Id>eng</iso639Id>
</languageList>
</configItem>
<variantList/>
Now you have a new keyboard layout with this mapping. Add the layout as the first option in your keyboard input methods and you will be able to use it in the terminal, editors, browser...
I have noticed that it doesn't work in some programs like Eclipse. Probably because it has a shorcut defined for them but it works in most places for me.
| Setting Shift + Spacebar + SomeLetter as an alternative for arrow keys |
1,403,565,920,000 |
I'm trying to follow the answer here to set up some key swaps (Capslock as CTRL) on external keyboards (Microsoft Natural Ergonomic 4000).
First step is this. Get the details of your USB keyboard. Run this command with the keyboard plugged in:
$ /lib/udev/findkeyboards | grep USB
USB keyboard: input/event6
This doesn't work for me, as /lib/udev/findkeyboards doesn't exist on my system - from Googling I can't find anyone else with this issue! Any idea why not - and how I can acquire the right version?
I'm running Xubuntu 16.04 64-bit, using the i3 window manager.
uname -a gives me this:
Linux will-ThinkPad-X220 4.13.0-45-generic #50~16.04.1-Ubuntu SMP Wed May 30 11:18:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
|
I'm not finding findkeyboards in any packages on Ubuntu 16.04 either. I did locate it in the Git repo for udev, so perhaps it's no longer being packaged, would be my guess. findkeyboards is nothing more than a shell script so you can install it where ever you like. It's located here:
https://github.com/lu-zero/udev/blob/master/src/keymap/findkeyboards
When I downloaded it and installed it, it appears to work fine:
$ ./findkeyboards
USB keyboard: input/event6
USB keyboard: input/event7
| /lib/udev/findkeyboards missing |
1,403,565,920,000 |
I occasionally use an external keyboard with my laptop. Recently I put my hands on a nice old HP PS2 keyboard, and I'm planning to use that. The keyboard works fine, but I have one minor issue: the capslock and numlock LEDs don't work as they should. Specifically, when I activate capslock, it turns on the LED on the laptop, but not on the keyboard.
The LEDs on more recent keyboards work, or at least, they do for some time. For example I also use a Logitech K120 and the LEDs on that one work correctly.
I tried disabling the laptop keyboard through xinput, but that didn't help. Any suggestions?
The laptop is an ASUS N56V, I run Funtoo Linux, and the keyboard is an HP D4950B.
|
Seems like this solved itself after the last kernel update.
| Keyboard LEDs versus Laptop LEDs [closed] |
1,403,565,920,000 |
I have two different keyboard layouts and I switch between them with Ctrl+Shift. And I want to display my current layout with i3blocks. Now I have a super small single-line script that returns current layout with the following command:
xkb-switch
But how can I update information when switching between keyboards?
What I've tried:
Attempt #1
I could successfully update information by setting in i3blocks.conf:
[language]
interval=1
... which forces my blocks to run the script every millisecond. It works ok but I'm really not sure it's the proper way to do that, particularly on the laptop.
Attempt #2
I also tried to send a signal to the block when pressing Ctrl+Shift with something like this in my i3/config:
bindsym --release Control+Shift exec --no-startup-id pkill -RTMIN+8 i3blocks
And with the following lines in i3blocks.conf:
[language]
interval=once
signal=8
But I couldn't make it work. If I change Control+Shift keys to any other key (for example $mod+Shift+z or CapsLock or Control+1) it works ok.
(I mean, it sends a signal and updates blocks. If I switch keyboard with Ctrl+Shift and then press Mod+Shift+z or CapsLock or Ctrl+1 it will send a signal, update i3blocks and the language block will change).
Other
I saw this post. It's also about switching the layouts. But I couldn't relate this to my problem. I'm not the best bash-programmer and don't understand what's going on in this kbdd-script. As far as I understand there's nothing about my problem.
|
Good guy on reddit helped me to solve the problem. I'll just copy-paste his answer here.
The crucial command:
xkb-switch -W
With the following lines in i3blocks.conf everything works like a dream.
# AUR package: xkb-switch-git
[keymap]
label=⌨
command=xkb-switch -W
#or
#command=bash -c 'xkb-switch;xkb-switch -W'
interval=persist
border=#0d5eaf
| How to update i3blocks when switching layouts? |
1,403,565,920,000 |
I have been trying to find a way to enable sticky keys in single user mode but the only thing I can find is in a desktop windowed environment.
Is there a module I need to load or something?
For those that will eventually ask I can only use one hand to type and have occasions where I have to work in single user mode.
|
Check out this howto. It says loadkeys understands keysyms like SShift, SCtrl, SAlt as sticky equivalents you can put in your console keymap.
This archlinux page shows you what to do. Basically, create a small keymaps file overriding the keys for shift and so on by the sticky equivalent. The following might provide you the required set of keycodes:
dumpkeys |
awk 'NR==1{print}
$4~"Shift|Control|Alt"{printf "%s %s %s S%s\n",$1,$2,$3,$4}'
Example output:
keymaps 0-255
keycode 29 = SControl
keycode 42 = SShift
keycode 54 = SShift
keycode 56 = SAlt
keycode 97 = SControl
keycode 100 = SAlt
keycode 125 = SAlt
keycode 126 = SAlt
Put this data in a file stickyKeys and load it
sudo loadkeys stickyKeys
The archlinux page provides you with a suitable systemd unit to load this at boot. In case of problems you can use showkey to show you each keycode as you type the keys.
I've not tried this, but when you build the kernel a default keymap is compiled in. You can replace this keymap with your desired one. If we look at the drivers/tty/vt/Makefile, we see a rule for defkeymap.o
$(obj)/defkeymap.o: $(obj)/defkeymap.c
but in the directory there is no defkeymap.c. There is however file defkeymap.c_shipped and it seems KBuild will strip the _shipped suffix for the build.
Later in the Makefile there is a comment and optional rule:
# Uncomment if you're changing the keymap and have an appropriate
# loadkeys version for the map. By default, we'll use the shipped
# versions.
# GENERATE_KEYMAP := 1
ifdef GENERATE_KEYMAP
$(obj)/defkeymap.c: $(obj)/%.c: $(src)/%.map
loadkeys --mktable $< > $@
endif
So we can see how to create our own defkeymap.c file from the current keymap by running
dumpkeys | loadkeys --mktable >defkeymap.c
Remove the shipped file and try building the kernel. Using dumpkeys gives a much larger table than the default, though I don't know why. You may prefer to find the source to your current keymap, say uncompressed/usr/lib/kbd/keymaps/xkb/gb-intl.map.gz or similar, edit this with your sticky changes, and then provide this file to loadkeys --mktable.
Note that once you have booted, this built-in keymap will probably get overridden early on by whatever mechanism your OS uses to set some standard configured keymap.
| sticky keys in single user mode |
1,403,565,920,000 |
I booted my laptop docked to a USB keyboard and external monitor. I've used it in this setup very recently and it was fine. Today, the USB keyboard is sometimes ignoring a key press.
It happened a couple of times when I hit Home. But if I test it specifically, the key works fine.
I thought maybe I was hitting it wrong after adjusting from the smaller laptop keyboard. But then it clearly dropped a few characters when I was starting to type something.
|
The problem is I have powertop.service enabled. Enabling this means powertop --autotune runs at startup and enables most extra power-saving features. It's very useful to improve the battery life.
Unfortunately this includes usb autosuspend on all (?) usb devices which are connected at the time. Linux deliberately defaults to not enabling autosuspend on input devices, due to reports like this, including my report at the time on what was most likely the same keyboard. (Logitech Internet 350).
Workaround
If you booted with the USB keyboard plugged in, just unplug it and then plug it back in again. This clears the configuration set by powertop --autotune.
A more "correct" solution would be to go through each command recommended by powertop, and create a boot script which runs all of them except the USB autosuspend one.
| USB keyboard is ignoring key presses in some very frustrating pattern |
1,403,565,920,000 |
Tmux doesn't passes correctly the ctrl-shift-arrow sequences.
It doesn't work on emacs, and when I use sed -n l, I see it displays the escape sequence of the arrow key alone instead of the full sequnce
For example, ctrl-shift-right passes as ^[[C (which is the same as the escape sequence of the right key), instead of ^[OC (outside tmux).
Any idea of how to solve this?
Note that ctrl-arrow key (without shift) and shift-arrow (without ctrl) pass correctly.
My .tmux.conf is:
# Changes prefix from Ctrl-b to Alt-a
unbind C-b
set -g prefix M-a
set-option -g default-terminal "xterm-256color"
# choosing windows with Alt-#
bind -n M-0 select-window -t 0
bind -n M-1 select-window -t 1
bind -n M-2 select-window -t 2
bind -n M-3 select-window -t 3
bind -n M-4 select-window -t 4
bind -n M-5 select-window -t 5
bind -n M-6 select-window -t 6
bind -n M-7 select-window -t 7
bind -n M-8 select-window -t 8
bind -n M-9 select-window -t 9
setw -g monitor-activity on
set -g visual-activity on
set-window-option -g window-status-current-bg white
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
# Toggle mouse on
bind m \
set -g mode-mouse on \;\
set -g mouse-resize-pane on \;\
set -g mouse-select-pane on \;\
set -g mouse-select-window on \;\
display 'Mouse: ON'
# Toggle mouse off
bind M \
set -g mode-mouse off \;\
set -g mouse-resize-pane off \;\
set -g mouse-select-pane off \;\
set -g mouse-select-window off \;\
display 'Mouse: OFF'
# disable selecting panes with mouse (because enabling mess with copy-paste)
set-option -g mouse-select-pane off
# display status bar message for 4 sec
set-option -g display-time 4000
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
# enable shift-arrow keys
set-window-option -g xterm-keys on
# start default shell
set-option -g default-shell $SHELL
# support for escape char for vi
set -s escape-time 0
|
It looks like tmux is doing the right thing for your example:
For example, ctrl-shift-right passes as ^[[C (which is the same as the escape sequence of the right key), instead of ^[OC (outside tmux).
because the usual connotation of that sequence is that it is the same as cursor-movement sent from the host. A zero parameter is the same as a missing parameter, which happens to be one.
The terminal was not identified; xterm does not do that. For controlshiftright-arrow, xterm may send ^[[1;6C. In this case, tmux absorbs the escape sequence sent, because it is not in the table of known xterm-style keys that it knows about. In tmux, the file xterm-keys.c contains a table, with the comment:
/*
* xterm-style function keys append one of the following values before the last
* character:
*
* 2 Shift
* 3 Alt
* 4 Shift + Alt
* 5 Ctrl
* 6 Shift + Ctrl
* 7 Alt + Ctrl
* 8 Shift + Alt + Ctrl
*
* Rather than parsing them, just match against a table.
*
* There are three forms for F1-F4 (\\033O_P and \\033O1;_P and \\033[1;_P).
* We accept any but always output the latter (it comes first in the table).
*/
| tmux doesn't passes correctly ctrl-shift-arrow sequences |
1,403,565,920,000 |
I know that keyboard is standard input and is referred by the stdin file.
I sometimes use a Bluetooth(BT) keyboard when working on my laptop. Both keyboards, my laptop keyboard as well as the BT keyboard work simultaneously.
So, are both keyboards associated with stdin? If yes, how are they synchronized?
|
A keyboard is just an input device, it has no direct relation to standard input as such. The standard input of a program is merely an abstract data stream that is passed as file descriptor 0.
Many programs using standard input take input from the keyboard, but they don't do this directly. Instead, in the absence of instructions to do otherwise, your shell connects the new program's standard input to your terminal, which is connected to your keyboard. That the input comes from the keyboard is not any concern of the program, which just sees a stream of data coming from your terminal.
As for how both keyboards work simultaneously, this work is typically performed at the kernel level, not at the terminal or application level. Applications can either request to get input from one of the keyboards, or a mux of all of them. This representation typically applies to most human input devices, not just keyboards.
If you are using X, or a similar intermediate layer(s) between the kernel and your program, more abstractions may be present, but the basic idea is the same—utility applications typically don't access the keyboard.
| Is bluetooth keyboard associated with `stdin`? |
1,403,565,920,000 |
Suppose that I have a desktop computer such that everything works except keyboard
. Is it possible to install and run Linux to this computer? I guess the answer is no as super user password requires keyboard but I'm not completely sure about this fact.
|
Actually, you can, as long as the proper tools are installed.
A few years ago, I ended up playing quite a bit with a Compaq TC1000 tablet. It had a detachable keyboard and a stylus.
Typing without the keyboard was a bit of a challenge, but I had installed an on-screen keyboard that activated during the display manager login and once my graphical session was established and ready. This setup used standard Debian packages during the Gnome 2.0 heyday.
I typically used it in its undocked mode to either browse the web or to take notes with Xournal. Xournal's ability to either annotate PDF's or appear just like a legal pad made it very easy to take handwritten notes for later transcription.
If standard text was desired, the on-screen keyboard I was using could be trained to recognize your block handwriting, in some ways acting like the Palm Pilot-style Graffiti handwriting recognition, except that you could use your natural handwriting, rather than use a dedicated alphabet.
It was functional for a couple of years until the hardware on that tablet became incredibly slow (as software bloated) and then finally died altogether. I see no reason that a modern touchscreen device couldn't do the same thing.
| Can I do everything on Linux without keyboard? [closed] |
1,403,565,920,000 |
I am unable to properly use dead key characters ( ' " ^ ) on (k)ubuntu 11.10 and 12.04 in arduino (a processing based application, at least version 0022 and 1.0).
Can I disable dead keys for specific application or application window, or does anybody know another work around?
'Dead keys' is the mechanism used to enter charactes like á ë ' ^, by first striking the accent-like key, then followed by a second key. The result is a combined character.
|
I finally managed to figure out a work around. In KDE the keyboard configuration can be set in:
System Settings
Keyboard Settings
Layout
Select 'Show indicator'
Select 'Per window'
Add
Select a variant without 'dead keys', eg. "English (US, with Euro on 5)"
After applying these settings, I select the window for input focus and I click the indicator in the system tray when I want to switch the keyboard configuration.
The keyboard setting needs only be set once per window and is rememberd over program restarts.
| Can I disable dead keys for a single application? |
1,403,565,920,000 |
I'm basically trying to figure out how to use keyboard-translate in Emacs to make M-- do the same thing as M-/
How do I go about doing this?
|
(define-key key-translation-map (kbd "M--") (kbd "M-/"))
If you use the kbd macro, you can use the string representation of the desired key sequence from the C-h k help text.
| How do I rebind M-/ in Emacs to M-- (dash) |
1,403,565,920,000 |
I used xev to try to capture the keycode, but I don't get any output from it. I get output for the rest of the keys I checked. This happened after my system froze (likely the fault of VirtualBox) so I wonder if it has anything to do with it.
UPDATE:
I just found out that it's functionality is actually swapped with that of Fn key (the special key that allow me, for example, to press it in combination with another to change screen brightness, speaker loudness, ...). How do I swap it back?
Note that before discovering that this was merely a key swap, I actually did a reinstall in desperation, and even poked around the (badly-designed) BIOS interface (this is a HP Probook 4350s) to see if I screwed up with anything.
|
My BIOS software/hardware must be flaky: my laptop was switched off for some hours, and the keys were swapped back on restart.
| Left Ctrl key swapped with Fn key? |
1,403,565,920,000 |
Sometimes when I fire up vim, my Insert key doesn't work (need to use i) and my arrows don't work (they give me letters instead).
I'm guessing this has to do with my keys not being mapped correctly. How can I fix this for good?
|
You need to declare the escape sequences sent by your usual terminals in your ~/.vimrc. In theory, escape sequences depend on the terminal. In practice, if an escape sequence corresponds to a certain key on a given terminal, other terminals either send it for the same key or don't send it at all, so you can just pile on the definitions and not worry about conflicts.
To find out what escape sequence a key sends, enter insert mode and press Ctrl+V followed by the key. This inserts the escape sequence literally.
Put directives like these in your ~/.vimrc (using the escape sequences that you've observed):
function Allmap(mapping)
execute 'map' a:mapping
execute 'map!' a:mapping
endfunction
call Allmap(' <ESC>[A <Up>')
call Allmap(' <ESC>[B <Down>')
call Allmap(' <ESC>[C <Right>')
call Allmap(' <ESC>[D <Left>')
call Allmap(' <ESC>[F <End>')
call Allmap(' <ESC>[H <Home>')
call Allmap(' <ESC>[5~ <PageUp>')
call Allmap(' <ESC>[6~ <PageDown>')
call Allmap(' <ESC>[k4~ <C-Left>')
call Allmap(' <ESC>[5D <C-Left>')
call Allmap(' <ESC>Od <C-Left>')
call Allmap(' <ESC>[k6~ <C-Right>')
call Allmap(' <ESC>[5C <C-Right>')
call Allmap(' <ESC>Oc <C-Right>')
| How to set keycodes manually in vim? |
1,403,565,920,000 |
I'm running openSUSE on HP Pavilion dm4.
I have a bunch of action keys (volume up/down, brightness, wifi etc.) on my function keys. For using standard Fx keys I have to hold Fn key.
The problem is that I more often use F1 to F12 than those actions.
How can I accomplish reverse this functionality? Holding Fn key for triggering actions — and have normal functionality of function keys.
|
Reboot, spam ESC key to enter BIOS, disable "Action Keys Mode" in the "System Configuration" section. Don't forget to save your settings!
| Disable action keys |
1,403,565,920,000 |
My friend just installed Debian on his laptop, a Lenovo Ideapad Slim 3 14. He has Linux version 6.1.0-12-amd64.
However, his integrated touchpad and keyboard don’t work. The issue happens on both Wayland and Xorg, and in TTY mode. It happens on Ubuntu 23.04 live as well.
Both work in Windows 11, and the keyboard works in GRUB.
An external keyboard connected by USB does work on Linux, though.
First, when looking at the dmesg, we saw these messages:
i8042: PNP: PS/2 Controller [PNP0303:KBC0] at 0x60,0x64 irq 1
i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
So we added the i8042.nopnp option to the kernel parameters. When rebooting, the messages were gone, and this got written to the dmesg:
input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
But the keyboard still didn’t work.
We tried adding each of the following kernel parameters, none changed anything:
i8042.dumbkbd=1
i8042.direct
i8042.dritek=1
pci.norcs
Here is the keyboard’s entry in /proc/bus/input/devices:
I: Bus=0011 Vendor=0001 Product=0002 Version=ab00
N: Name="AT Raw Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input0
U: Uniq=
H: Handlers=sysrq kbd event0
B: PROP=0
B: EV=100013
B: KEY=402000000 3803078f800d001 feffffdfffefffff fffffffffffffffe
B: MSC=10
We can see the keyboard’s device file is /dev/input/event0. He tried to cat the file and use his keyboard, which prints nothing to the terminal. It does print something on my laptop.
i8042 doesn’t appear in lsmod. modprobe i8042 prints nothing and doesn’t solve the issue.
Do you have any idea to further investigate the issue?
dmesg
|
It is actually a known issue about the Linux kernel, here is the ticket.
| Laptop keyboard and touchpad not working |
1,686,668,221,000 |
I'm wondering if there is a way to make dead keys working in DWM ?
I'm actually using a french AZERTY keyboard:
setxkbmap fr
For example, I can't get the ê character to print in the terminal. I get ^e instead.
I tried with several fonts, such as Liberation Mono, Mononoki or Cascadia Mono.
I can print this character anywhere else in my computer (text editor, web browser, etc.).
Here are my locale settings:
bash ~ $ locale
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=fr_FR.UTF-8
Here is my st config file:
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
/*static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true"; */
static char *font = "Mononoki:pixelsize=20:antialias=true:autohint=true";
/* static char *font = "Cascadia Mono:pixelsize=20:antialias=true:autohint=true"; */
static int borderpx = 2;
/*
* What program is execed by st depends of these precedence rules:
* 1: program passed with -e
* 2: scroll and/or utmp
* 3: SHELL environment variable
* 4: value of shell in /etc/passwd
* 5: value of shell in config.h
*/
static char *shell = "/bin/bash";
char *utmp = NULL;
/* scroll program: to enable use a string like "scroll" */
char *scroll = NULL;
char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
/* identification sequence returned in DA and DECID */
char *vtiden = "\033[?6c";
/* Kerning / character bounding-box multipliers */
static float cwscale = 1.0;
static float chscale = 1.0;
/*
* word delimiter string
*
* More advanced example: L" `'\"()[]{}"
*/
wchar_t *worddelimiters = L" ";
/* selection timeouts (in milliseconds) */
static unsigned int doubleclicktimeout = 300;
static unsigned int tripleclicktimeout = 600;
/* alt screens */
int allowaltscreen = 1;
/* allow certain non-interactive (insecure) window operations such as:
setting the clipboard text */
int allowwindowops = 0;
/*
* draw latency range in ms - from new content/keypress/etc until drawing.
* within this range, st draws when content stops arriving (idle). mostly it's
* near minlatency, but it waits longer for slow updates to avoid partial draw.
* low minlatency will tear/flicker more, as it can "detect" idle too early.
*/
static double minlatency = 8;
static double maxlatency = 33;
/*
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
* attribute.
*/
static unsigned int blinktimeout = 800;
/*
* thickness of underline and bar cursors
*/
static unsigned int cursorthickness = 2;
/*
* bell volume. It must be a value between -100 and 100. Use 0 for disabling
* it
*/
static int bellvolume = 0;
/* default TERM value */
char *termname = "st-256color";
/*
* spaces per tab
*
* When you are changing this value, don't forget to adapt the »it« value in
* the st.info and appropriately install the st.info in the environment where
* you use this st version.
*
* it#$tabspaces,
*
* Secondly make sure your kernel is not expanding tabs. When running `stty
* -a` »tab0« should appear. You can tell the terminal to not expand tabs by
* running following command:
*
* stty tabs
*/
unsigned int tabspaces = 8;
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
/* 8 normal colors */
"black",
"red3",
"green3",
"yellow3",
"blue2",
"magenta3",
"cyan3",
"gray90",
/* 8 bright colors */
"gray50",
"red",
"green",
"yellow",
"#5c5cff",
"magenta",
"cyan",
"white",
[255] = 0,
/* more colors can be added after 255 to use with DefaultXX */
"#cccccc",
"#555555",
"gray90", /* default foreground colour */
"black", /* default background colour */
};
/*
* Default colors (colorname index)
* foreground, background, cursor, reverse cursor
*/
unsigned int defaultfg = 258;
unsigned int defaultbg = 237;
unsigned int defaultcs = 256;
static unsigned int defaultrcs = 257;
/*
* Default shape of cursor
* 2: Block ("█")
* 4: Underline ("_")
* 6: Bar ("|")
* 7: Snowman ("☃")
*/
static unsigned int cursorshape = 2;
/*
* Default columns and rows numbers
*/
static unsigned int cols = 80;
static unsigned int rows = 24;
/*
* Default colour and shape of the mouse cursor
*/
static unsigned int mouseshape = XC_xterm;
static unsigned int mousefg = 7;
static unsigned int mousebg = 0;
/*
* Color used to display font attributes when fontconfig selected a font which
* doesn't match the ones requested.
*/
static unsigned int defaultattr = 11;
/*
* Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set).
* Note that if you want to use ShiftMask with selmasks, set this to an other
* modifier, set to 0 to not use it.
*/
static uint forcemousemod = ShiftMask;
/*
* Internal mouse shortcuts.
* Beware that overloading Button1 will disable the selection.
*/
const unsigned int mousescrollincrement = 1;
static MouseShortcut mshortcuts[] = {
/* mask button function argument release */
{ XK_ANY_MOD, Button4, kscrollup, {.i = 1}, 0, /* !alt */ -1 },
{ XK_ANY_MOD, Button5, kscrolldown, {.i = 1}, 0, /* !alt */ -1 },
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
{ ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} },
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
{ ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} },
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
};
/* Internal keyboard shortcuts. */
#define MODKEY Mod1Mask
#define TERMMOD (ControlMask|ShiftMask)
static Shortcut shortcuts[] = {
/* mask keysym function argument */
{ XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} },
{ TERMMOD, XK_C, clipcopy, {.i = 0} },
{ TERMMOD, XK_V, clippaste, {.i = 0} },
{ MODKEY, XK_i, zoom, {.f = +1} },
{ MODKEY, XK_o, zoom, {.f = -1} },
{ MODKEY, XK_r, zoomreset, {.f = 0} },
{ MODKEY, XK_Page_Up, kscrollup, {.i = -1} },
{ MODKEY, XK_Page_Down, kscrolldown, {.i = -1} },
{ MODKEY, XK_Up, kscrollup, {.i = 1} },
{ MODKEY, XK_Down, kscrolldown, {.i = 1} },
};
/*
* Special keys (change & recompile st.info accordingly)
*
* Mask value:
* * Use XK_ANY_MOD to match the key no matter modifiers state
* * Use XK_NO_MOD to match the key alone (no modifiers)
* appkey value:
* * 0: no value
* * > 0: keypad application mode enabled
* * = 2: term.numlock = 1
* * < 0: keypad application mode disabled
* appcursor value:
* * 0: no value
* * > 0: cursor application mode enabled
* * < 0: cursor application mode disabled
*
* Be careful with the order of the definitions because st searches in
* this table sequentially, so any XK_ANY_MOD must be in the last
* position for a key.
*/
/*
* If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
* to be mapped below, add them to this array.
*/
static KeySym mappedkeys[] = { -1 };
/*
* State bits to ignore when matching key or button events. By default,
* numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
*/
static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
/*
* This is the huge key array which defines all compatibility to the Linux
* world. Please decide about changes wisely.
*/
static Key key[] = {
/* keysym mask string appkey appcursor */
{ XK_KP_Home, ShiftMask, "\033[2J", 0, -1},
{ XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1},
{ XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1},
{ XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1},
{ XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0},
{ XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1},
{ XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1},
{ XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0},
{ XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1},
{ XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1},
{ XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0},
{ XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1},
{ XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1},
{ XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0},
{ XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1},
{ XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1},
{ XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0},
{ XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
{ XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0},
{ XK_KP_End, ControlMask, "\033[J", -1, 0},
{ XK_KP_End, ControlMask, "\033[1;5F", +1, 0},
{ XK_KP_End, ShiftMask, "\033[K", -1, 0},
{ XK_KP_End, ShiftMask, "\033[1;2F", +1, 0},
{ XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0},
{ XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0},
{ XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0},
{ XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0},
{ XK_KP_Insert, ShiftMask, "\033[4l", -1, 0},
{ XK_KP_Insert, ControlMask, "\033[L", -1, 0},
{ XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0},
{ XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
{ XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
{ XK_KP_Delete, ControlMask, "\033[M", -1, 0},
{ XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_KP_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0},
{ XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0},
{ XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0},
{ XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0},
{ XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0},
{ XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0},
{ XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0},
{ XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0},
{ XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0},
{ XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0},
{ XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0},
{ XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0},
{ XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0},
{ XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0},
{ XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0},
{ XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0},
{ XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0},
{ XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0},
{ XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0},
{ XK_Up, ShiftMask, "\033[1;2A", 0, 0},
{ XK_Up, Mod1Mask, "\033[1;3A", 0, 0},
{ XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0},
{ XK_Up, ControlMask, "\033[1;5A", 0, 0},
{ XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0},
{ XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0},
{ XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0},
{ XK_Up, XK_ANY_MOD, "\033[A", 0, -1},
{ XK_Up, XK_ANY_MOD, "\033OA", 0, +1},
{ XK_Down, ShiftMask, "\033[1;2B", 0, 0},
{ XK_Down, Mod1Mask, "\033[1;3B", 0, 0},
{ XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0},
{ XK_Down, ControlMask, "\033[1;5B", 0, 0},
{ XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0},
{ XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0},
{ XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0},
{ XK_Down, XK_ANY_MOD, "\033[B", 0, -1},
{ XK_Down, XK_ANY_MOD, "\033OB", 0, +1},
{ XK_Left, ShiftMask, "\033[1;2D", 0, 0},
{ XK_Left, Mod1Mask, "\033[1;3D", 0, 0},
{ XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0},
{ XK_Left, ControlMask, "\033[1;5D", 0, 0},
{ XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0},
{ XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0},
{ XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0},
{ XK_Left, XK_ANY_MOD, "\033[D", 0, -1},
{ XK_Left, XK_ANY_MOD, "\033OD", 0, +1},
{ XK_Right, ShiftMask, "\033[1;2C", 0, 0},
{ XK_Right, Mod1Mask, "\033[1;3C", 0, 0},
{ XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0},
{ XK_Right, ControlMask, "\033[1;5C", 0, 0},
{ XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0},
{ XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0},
{ XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0},
{ XK_Right, XK_ANY_MOD, "\033[C", 0, -1},
{ XK_Right, XK_ANY_MOD, "\033OC", 0, +1},
{ XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0},
{ XK_Return, Mod1Mask, "\033\r", 0, 0},
{ XK_Return, XK_ANY_MOD, "\r", 0, 0},
{ XK_Insert, ShiftMask, "\033[4l", -1, 0},
{ XK_Insert, ShiftMask, "\033[2;2~", +1, 0},
{ XK_Insert, ControlMask, "\033[L", -1, 0},
{ XK_Insert, ControlMask, "\033[2;5~", +1, 0},
{ XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
{ XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
{ XK_Delete, ControlMask, "\033[M", -1, 0},
{ XK_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_Delete, ShiftMask, "\033[3;2~", +1, 0},
{ XK_Delete, XK_ANY_MOD, "\033[P", -1, 0},
{ XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_BackSpace, XK_NO_MOD, "\177", 0, 0},
{ XK_BackSpace, Mod1Mask, "\033\177", 0, 0},
{ XK_Home, ShiftMask, "\033[2J", 0, -1},
{ XK_Home, ShiftMask, "\033[1;2H", 0, +1},
{ XK_Home, XK_ANY_MOD, "\033[H", 0, -1},
{ XK_Home, XK_ANY_MOD, "\033[1~", 0, +1},
{ XK_End, ControlMask, "\033[J", -1, 0},
{ XK_End, ControlMask, "\033[1;5F", +1, 0},
{ XK_End, ShiftMask, "\033[K", -1, 0},
{ XK_End, ShiftMask, "\033[1;2F", +1, 0},
{ XK_End, XK_ANY_MOD, "\033[4~", 0, 0},
{ XK_Prior, ControlMask, "\033[5;5~", 0, 0},
{ XK_Prior, ShiftMask, "\033[5;2~", 0, 0},
{ XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
{ XK_Next, ControlMask, "\033[6;5~", 0, 0},
{ XK_Next, ShiftMask, "\033[6;2~", 0, 0},
{ XK_Next, XK_ANY_MOD, "\033[6~", 0, 0},
{ XK_F1, XK_NO_MOD, "\033OP" , 0, 0},
{ XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0},
{ XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0},
{ XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0},
{ XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0},
{ XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0},
{ XK_F2, XK_NO_MOD, "\033OQ" , 0, 0},
{ XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0},
{ XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0},
{ XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0},
{ XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0},
{ XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0},
{ XK_F3, XK_NO_MOD, "\033OR" , 0, 0},
{ XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0},
{ XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0},
{ XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0},
{ XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0},
{ XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0},
{ XK_F4, XK_NO_MOD, "\033OS" , 0, 0},
{ XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0},
{ XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0},
{ XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0},
{ XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0},
{ XK_F5, XK_NO_MOD, "\033[15~", 0, 0},
{ XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0},
{ XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0},
{ XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0},
{ XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0},
{ XK_F6, XK_NO_MOD, "\033[17~", 0, 0},
{ XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0},
{ XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0},
{ XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0},
{ XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0},
{ XK_F7, XK_NO_MOD, "\033[18~", 0, 0},
{ XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0},
{ XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0},
{ XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0},
{ XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0},
{ XK_F8, XK_NO_MOD, "\033[19~", 0, 0},
{ XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0},
{ XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0},
{ XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0},
{ XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0},
{ XK_F9, XK_NO_MOD, "\033[20~", 0, 0},
{ XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0},
{ XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0},
{ XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0},
{ XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0},
{ XK_F10, XK_NO_MOD, "\033[21~", 0, 0},
{ XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0},
{ XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0},
{ XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0},
{ XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0},
{ XK_F11, XK_NO_MOD, "\033[23~", 0, 0},
{ XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0},
{ XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0},
{ XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0},
{ XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0},
{ XK_F12, XK_NO_MOD, "\033[24~", 0, 0},
{ XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0},
{ XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0},
{ XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0},
{ XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0},
{ XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0},
{ XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0},
{ XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0},
{ XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0},
{ XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0},
{ XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0},
{ XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0},
{ XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0},
{ XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0},
{ XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0},
{ XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0},
{ XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0},
{ XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0},
{ XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0},
{ XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0},
{ XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0},
{ XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0},
{ XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0},
{ XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0},
{ XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0},
{ XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0},
{ XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0},
{ XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0},
};
/*
* Selection types' masks.
* Use the same masks as usual.
* Button1Mask is always unset, to make masks match between ButtonPress.
* ButtonRelease and MotionNotify.
* If no match is found, regular selection is used.
*/
static uint selmasks[] = {
[SEL_RECTANGULAR] = Mod1Mask,
};
/*
* Printable characters in ASCII, used to estimate the advance width
* of single wide characters.
*/
static char ascii_printable[] =
" !\"#$%&'()*+,-./0123456789:;<=>?"
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
"`abcdefghijklmnopqrstuvwxyz{|}~";
EDIT 1:
My operating system is CalculateLinux (Gentoo based).
I tried in XTerm, and the dead keys work as expected (I get ê).
There are the two different behaviors:
When working as expected, I press the ^ key once. Nothing happens, then I press e and I get ê.
What happens in the suckless-terminal is that I press ^, it immediately displays ^, then I press e, so I get ^e as a final result.
NB: the same behavior occurs with ë and ¨e for example, as with all other dead keys accents.
|
The solution comes from here, thanks to @MC68020.
I needed to add
export XMODIFIERS=
before
exec dwm
into my .xinitrc.
If anyone has other solution, do not hesitate do give it here !
| Suckless Terminal dead keys |
1,686,668,221,000 |
My Window Manager/Desktop Environment has some applications where the dead keys (e.g.`, ~, ö) are not working by default, when I press then, they sometimes doesn't show at all on key press, sometimes they don't have the expected behavior('`'+ 'e'= è). They do work on some applications though, like here on firefox. How can I make they all work as expected in all applications ?
|
Tutorial
Hello guys, I'm here to address this common problem we all once faced. The purpose of this tutorial is to solve this problem once for all. The information is out there, but is all over the place and sometimes we feel confused with the amount of different approaches that we can find to resolve this problem. Here, I'll try to synthesize all the information, so we can use our dead keys and compose symbols in any application.
This problem usually appears when we use a Window Manager(WM) or when our Desktop Environment(DE) is not properly configured.
The Solutions
There are two ways to address this problem:
Disable Input Method Engine(IME) and use X11 to compose keys - This approach only works for latin languages characters.
Properly configure iBus or Fcitx - This approach works for every language.
Here in this tutorial I'll address both approaches and talk a bit on why you should consider them.
Disable Input Method Engine(IME)
IMEs, like iBus or Fcitx are complexes engines built to compose non-latin characters languages (e.g. Japanese, Chinese, etc.)
If you don't need to type in those languages, there is really not a need for using either iBus or Fcitx, because X11 can handle pretty easy the task to compose the latin characters.
Disable iBus completely and use the system x11 to compose and use your dead keys.
How to:
These steps are taken from Janek Bevendorff's Answer
You gonna need these Environment Variables:
export GTK_IM_MODULE=""
export QT_IM_MODULE=""
export XMODIFIERS=""
You can set these variables either system-wide in /etc/profile (or a dedicated file inside /etc/profile.d, respectively) or inside your local ~/.xprofile. Setting it in ~/.bashrc or ~/.profile will not ensure that the lines will be executed when logging into your system using a graphical login manager such as GDM, SDDM, KDM or LightDM. If you are starting your X session using XDM, Slim or startx, you need to put those lines in ~/.xinitrc.
If you configured an input method other than ibus, go to Gnome settings afterwards and make sure any ibus-related settings are disabled, especially any keyboard shortcuts. Alternatively, tell Gnome not to touch your keyboard settings using:
gsettings set org.gnome.settings-daemon.plugins.keyboard active false
After that, restart your computer and test your faulty applications.
Properly configure iBus or Fcitx
If you need a very complex Input Method Engine for your language or if you do want the possibility to have it as an input method, you should follow these steps to properly configure your IME.
Here you have a choice, you can either go with iBus or Fcitx5, start first with what is installed in your Desktop Environment.
For those who uses a Window Manager with minimal installation, checkout iBus Arch Wiki and Fcitx5 Arch Wiki to make a proper decision.
How to:
1. Input Method Configuration
First in our system we need to setup the Input Method to be either iBus or Fcitx5.
In your terminal, type:
$ im-config
Then click OK, select YES (We wish to update the user configuration). In the next window, select the IME that you want (either ibus or fcitx), then OK and OK again.
You'll be told that you need to restart your system to make the configuration active.
2. Restart your computer.
3. Configure iBus or fcitx5
After your system restarts, configure your inputs methods through the GUI application
iBus
$ ibus-setup
It'll prompt you to start ibus-daemon, click YES (It is important that you don't have an script that autostart ibus-daemon in your system in this moment, otherwise the new ibus-daemon with the recent configured settings won't start.)
Fcitx5
See Fcitx5 Configuration
After configuring, we need to make sure that iBus daemon or fcitx daemon is running when our system starts.
For Desktop Environments, the autostart usually works out of the box. For us that use a Window Manager or if your ibus-daemon isn't autostarting in your Desktop Environment, we need to create a script to start our IME with our Session.
So in your ~/.xprofile file you'll need those lines:
For iBus
export GTK_IM_MODULES="ibus"
export QT_IM_MODULES="ibus"
export XMODIFIERS="@im=ibus"
ibus-daemon -drxR
For Fcitx5
export GTK_IM_MODULES="fcitx"
export QT_IM_MODULES="fcitx"
export XMODIFIERS="@im=fcitx"
fcitx5 -d
For more information on Fcitx5 autostart: Fcitx5 Arch Wiki
4. Test your applications
Now test if the applications are working correctly.
5. Restart your computer
This last restart is to check if the IME is autostarting after we configured them, if after this last restart, your applications are working fine, you can rest ease and focus on coding :)
That's it guys ! I hope after all this, your system is working properly, if you guys have any questions, please comment here and I'll try to help.
Cya !
*This post was originally made by me in JetBrains issue track Cannot type dead keys in Linux
| How to make Dead Keys(Compose) Work with Window Managers? |
1,686,668,221,000 |
PROBLEM:
Alt-Gr is not functional under X11. It seems that keyboard level 3 (for 'at', 'euro', 'curly brackets', etc.) is not set up upon pressing Alt-Gr. In the text console (reached by Right-Shift Right-Alt 1), this problem does not occur.
Applying settings like:
xmodmap -e "keysym q = q Q at"
does not cure the problem.
This problem is critical! The system is virtually unusable in X-Windows.
What can be done?
SETUP:
uname -v: Ub#45~20.04.1-Ubuntu SMP Fri Jan 15 11:35:04 UTC 2021
The file /etc/default/keyboard contains:
XKBMODEL="pc105"
XKBLAYOUT="de"
XKBVARIANT=""
XKBOPTIONS=""
Using xkeycaps/xev shows that:
Alt-Gr sends key code '108'
The xmodmap delivers
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
Ouput of xev upon Alt-Gr.
KeyPress event, serial 37, synthetic NO, window 0x3200001,
root 0x251, subw 0x0, time 6145247, (1781,-38), root:(1804,42),
state 0x10, keycode 108 (keysym 0xff20, Multi_key), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: True
KeyRelease event, serial 37, synthetic NO, window 0x3200001,
root 0x251, subw 0x0, time 6145491, (1781,-38), root:(1804,42),
state 0x10, keycode 108 (keysym 0xff20, Multi_key), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
|
The problem was that switching keyboard profiles, somehow got the xmodmap settings confused. Further, the Multi_Key does not seem to replace the keyboard level 3 properly. So, I created a file $HOME/.Xmodmap by applying
> xmodmap -pke > .Xmodmap
The I changed the line in .Xmodmap which handles the key code 108, i.e. the one which xev identified as the Alt-Gr key:
keycode 108 = ISO_Level3_Shift ISO_Level3_Shift ISO_Level3_Shift ISO_Level3_Shift
Then reloaded it via
> xmodmap .Xmodmap
I waited for a few minutes. And voilá! I got my @ signs, my curly brackets, and my € sign back on my keyboard.
| Alt-Gr and keyboard level 3 |
1,686,668,221,000 |
I have an odd issue that is actually solved but which I'm curious on if anyone knows the cause of.
I have a laptop (Lenovo ideapad 330) which came preinstalled with Windows 10. I have installed Ubuntu 20.04.1 LTS beside windows and can dual boot to either of them via grub.
When booting the laptop grub gives me 4 options:
Ubuntu
Advanced options for ubuntu
Windows 10
Bios (If i remember correctly)
Most times everything works as expected and I can boot into any of the options.
The issue:
Two times since I installed Ubuntu about a month ago the following has occurred: When I'm booting all 4 options above show up but I'm unable to choose 2 and 3. Arrow up and arrow down just jumps over option 2 and 3.
At this point if I boot into Ubuntu there is another issue. Some keys on the keyboard do not work while others do. I have not tested all keys to see which work. Most keys work but "c" and "spacebar" for example have no effect. Pressing them does nothing regardless of which application is open. The oddest part is the solution.
The solution:
If boot into Ubuntu, login and press the "Fn" key everything starts working as expected. All keys start working instantly in Ubuntu and I'm once again able to boot into Windows 10 and advanced options for Ubuntu.
So I have a solution to the issue but I'm extremely interested in if anyone knows why this happens as it seems very odd to me with an issue that relates to both the keyboard once booted in Ubuntu and not being able to boot into Windows and also that it happens intermittently. Any suggestions or thoughts?
I've tried googling the issue but have not found any matches that relate both to booting and keyboard and all options showing in grub without being able to select them.
|
I have a totally different laptop, and different OS setup, but the same issue occurred, and I was able to figure out why it happens. When you are shutting down the laptop, the Fn key gets stuck in the Pressed state. For this reason, when you try to boot, the computer remembers that the Fn key is in the Pressed state, and thinks that it is still pressed. Hence, pressing ↓ yields instead Fn+↓, in other words "Scroll to the very bottom", and pressing ↑ yields Fn+↑, or "Scroll to the very top". This is also the reason that some keys don't work -- the ones to which Fn+(key) has an associated action.
When you finally log in, you press the key, and Ubuntu sends an "Fn key released" signal, which releases the key, and allows you to proceed normally.
One other workaround that I've found, which I am not sure if will work on your setup, is that if I wish to press some key to which an Fn action is associated, then I can hold Fn while clicking that key, and that processes the key as if no Fn is held (i.e., the second press reverses the Pressed state of the Fn key). In other words, if I wish to boot into Windows, I would press Fn+↓, and that would do a regular scrolling down. However, Windows doesn't seem to be able to change the state of the Fn key, so I have to keep holding the Fn key down the entire time I work in Windows if I do this.
Please let me know if my second workaround works for you, I am curious.
| Odd keyboard and boot option issue probably related to Ubuntu dual boot (Solved but curious on cause) |
1,686,668,221,000 |
I use GNOME 3.36 on Arch Linux and even if control panel shows up the right option activated (see the screenshot below); none virtual keyboard is shown when needed i.e. on an input box like the search box on the upper-left corner.
How can I have an onscreen-keyboard?
Do I need any external package?
journalctl does not show any error/warning switching off/on the setting
|
Thank to @muru,
I solved this issue by installing the caribou package
| Where is the GNOME virtual keyboard? |
1,686,668,221,000 |
My question is simple. xev isn't registering Fn+F4 keypress on my Asus FX505DT running Kubuntu 19.10.
So, how shall I proceed with solving this issue?
|
After this much much time, I've figured out how to make this Fn + F4 keypress recognizable by xev.
The issue started with this key combination having the keycode 248 which isn't interpreted by the X Window system since it only accepts keycodes between 8 - 255.
Apparently, 248 is the keycode interpreted by showkey in the virtual console and 8 has to be added to it, which makes it greater than 255. (I don't have any reference for this but I've read this on many threads.)
Once I found out the issue, the solution was simple, to re-allocate the Fn+F4 keypress somewhere between 8 - 255. I found the unassigned keycodes using xmodmap -pke, and in my case I went with 120.
Afterwards, I proceeded using this tutorial.
In my case, showkey -s wan't returning anything so I had to use getkeycodes.
Once the keycode 120 was assigned to Fn + F4, I assigned the XF86AudioMicMute symbol to it using xmodmap.
| `xev` doesn't register my `Fn+F4` keypress? How to bind this combination? |
1,686,668,221,000 |
I have a KVM switch sharing my USB keyboard between Linux and Windows systems. If the switch is set to the Linux box when it boots up then the keyboard works fine. If I switch away to the Windows box the keyboard still works fine, but if I switch back to Linux I start getting missed and repeated keystrokes, making it almost unusable. This is on a virtual terminal and the problem carries across to the other vts as well.
Is there some way that I can reset the keyboard or its driver without having to reboot?
I'm running an ancient Fedora Core 8 distro, if that matters.
Thanks.
|
Starting the X server and then exiting it seems to fix the problem. A bit heavy-handed, but better than rebooting.
| How to reset keyboard driver? |
1,686,668,221,000 |
Since migrating from Linux Mint 18.3 to the latest Manjaro stable, I have been unable to type diaereses. When I try, it immediately creates a quotation mark, instead of waiting for other input (another letter to create diaeresis or space to create quotation mark).
I could not find anything related on the internet to solve this problem, but maybe my google-fu deserted me on this one. Anyone have a solution?
|
When I switched to US international with dead keys, it did work. Don't know why I didn't try that one earlier!
| Unable to type diaeresis using keyboard |
1,686,668,221,000 |
I want to show the short discription of my current keyboard layout.
Currently it shows
Layout English (US)
or
Layout German
I would prefer EN(US) and DE.
I use the script from kbdd_layout. I could not figure out how the string is parsed and it would be great if someone would help me out.
Consider the code
#!/usr/bin/env bash
#
killall kbdd 2>/dev/null
kbdd >/dev/null || exit 1
# Get initial state of layout
N=$( dbus-send --print-reply=literal --dest=ru.gentoo.KbddService\
/ru/gentoo/KbddService ru.gentoo.kbdd.getCurrentLayout 2>/dev/null |\
sed -un 's/^.*uint32 //p' )
# In case dbus service wasn't available yet, poll until service is ready
while [[ -z "$N" ]]; do
sleep .1
N=$( dbus-send --print-reply=literal --dest=ru.gentoo.KbddService\
/ru/gentoo/KbddService ru.gentoo.kbdd.getCurrentLayout 2>/dev/null |\
sed -un 's/^.*uint32 //p' )
done
echo $( dbus-send --print-reply=literal --dest=ru.gentoo.KbddService \
/ru/gentoo/KbddService ru.gentoo.kbdd.getLayoutName uint32:$N )
# Parse dbus output
dbus-monitor "interface='ru.gentoo.kbdd',member='layoutNameChanged'" |\
sed -un '0~2p' | sed -un 's:.*string "\(.*\)".*:\1:p' | sed -u '/:/d'
|
I did like follows (modified for your needs):
#!/usr/bin/env bash
#
killall kbdd 2>/dev/null
kbdd >/dev/null || exit 1
# Get initial state of layout
N=$( dbus-send --print-reply=literal --dest=ru.gentoo.KbddService\
/ru/gentoo/KbddService ru.gentoo.kbdd.getCurrentLayout 2>/dev/null |\
sed -un 's/^.*uint32 //p' )
# In case dbus service wasn't available yet, poll until service is ready
while [[ -z "$N" ]]; do
sleep .1
N=$( dbus-send --print-reply=literal --dest=ru.gentoo.KbddService\
/ru/gentoo/KbddService ru.gentoo.kbdd.getCurrentLayout 2>/dev/null |\
sed -un 's/^.*uint32 //p' )
done
dbus-send --print-reply=literal --dest=ru.gentoo.KbddService \
/ru/gentoo/KbddService ru.gentoo.kbdd.getLayoutName uint32:$N |\
sed -un 's:.*English.*:EN(US):p;s:.*German.*:DE:p'
# Parse dbus output
dbus-monitor "interface='ru.gentoo.kbdd',member='layoutNameChanged'" |\
sed -un 's:.*English.*:EN(US):p;s:.*German.*:DE:p'
Just remember to tweak the script accordingly, in case if you will change layouts.
| How to show only short keyboard layout in i3blocks with kbdd_layout? |
1,686,668,221,000 |
My friend just installed Peppermint 7 (based on Ubuntu 16.04, with xfce) on his laptop. Arabic is installed on the system, he's trying to use the Saudi Arabian version.
I'd like to leave the language as English but be able to switch the keyboard to arabic.
Xfce keyboard switcher doesn't seem to be working, doesn't detect arabic, right clicking it and trying to select its settings won't work either.
Arabic option is grayed in keyboard layout
sudo echo '@setxkbmap -option grp:alt_shift_toggle "us,ar"' | sudo tee -a /etc/xdg/lxsession/Peppermint/autostart
and
sudo echo '@setxkbmap -option grp:alt_shift_toggle "en,ar"' | sudo tee -a /etc/xdg/lxsession/Peppermint/autostart
Doesn't seem to work either. Personally I have never installed a secondary language on my PC and the solutions I tried are the ones posted on peppermint's forum. I don't know what else to try
|
Issue solved by following instructions from here
Basically it seems that I needed to install this
https://launchpad.net/~peppermintos/+archive/ubuntu/p7-dev/+files/xfce4-settings_4.12.0-2ubuntu1+peppermint1_amd64.deb
Since the guy on the forum claims that the newer versions won't work. After doing that I was able to add arabic
Click the Add button (+) .. highlight the "Keyboard Layouts" item, and
click the "Add" button. (You'll see a flag appear by your clock) click
the "Close button.
And I had to restart the PC. Perhaps a log out / log in would work but I did a restart.
| How to enable Arabic keyboard in Peppermint OS 7? |
1,686,668,221,000 |
OK, so this is strange.
I recently bought a HP Pavilion ab153nr laptop and installed UbuntuMate 15.10 on it. While setting everything up, I noticed that the screensaver would occasionally stop showing (ie, go back to the desktop) without me touching the computer, but I didn't worry about it. When I started using the computer, however, I noticed some additional strange behavior. Scrolling in my browser would sometimes cause the page to zoom in or out, and while typing in my IDE I would get apparently random commands.
Running xev shows that something is sending Alt_L, Control_L and Shift_R events. I ran xev overnight, and it counted 5 Shift_R KeyRelease events, 15 Alt_L events, and 25 Control_L events. Interestingly, there are no KeyPress events, though there are FocusOut, FocusIn, and KeymapNotify events. I don't know enough to know if those are relevant, however.
It's not related to my KVM switch (symptoms persisted when I disconnected it) or the laptop hardware (booting into the Windows 10 partition and leaving either the screen saver or the on-screen keyboard up for hours showed no unexpected behavior.)
Anyone have any ideas about what could be causing this? A way to better identify what process is sending these events? The laptop is supposed to be my development machine, but it's pretty much unusable with random control characters being sent every 10 minutes or so. I've put the log at http://pastebin.com/3inwfuxG if anyone wants to take a look; everything after the Scroll_Lock presses until the mouse movements at the end of the file is from when the box was left idle over night.
UPDATE 10/06: I rebooted into a Ubuntu/Mate Live stick and the problem persisted,but at a vastly reduced rate; maybe a few times a day instead of a few times an hour. I tried an Ubuntu/Unity 15.04 Live Stick, and I saw the problem ~3 times per hour. I went back to my installed system and deleted the two keyboard shortcuts I'd added, but that didn't change anything. I'm not using any keyboard remapper unless one comes enabled by default in Mate. But the comments about the focus changing got me thinking, and I watched when those occurred. It's hard to tell since the log doesn't timestamp them, but those are related to the screensaver coming on and off. The focus out happens when the screensaver starts, then there's an unpredictable length of time until the random keyboard event, and then the focus in occurs as the desktop comes back. I turned off the screensaver to confirm this and get a cleaner log, and two (or maybe three) very strange things happened: I started getting keyPress events for the mysterious keypresses; the rate of keypresses dropped significantly, down to what I saw on the Ubuntu/Mate Live Stick; and I've only seen Control_L events since then, and not Alt_L or Shift_R, though given the sharply reduced rate of occurrence, it's possible that's just a coincidence.
So on the installed system with screensaver enabled, I see multiple events per hour. On the Mate LiveStick with screensaver enabled, I see a handful of events per day. On the Unity LiveStick, which doesn't even have a screensaver, I see a smaller number of events per hour. And on the installed system with screensaver disabled, I see only a handful of events per day. There's no consistency here, so I'm missing something.
This is driving me batty. I was almost ready to call it a hardware problem despite the evidence until changing settings on the box changed the rate of incidence. I still might use cygwin to put xev on the Windows partition and leave that running overnight to see if it captures anything.
|
A workaround has been identified for this issue. In the GRUB config, specify the kernel parameter 'i8042.dumbkbd'. This will disable some or all of the keyboard lights, but will prevent the symptoms described.
| System creates extra shift/alt/control keypresses |
1,686,668,221,000 |
I have a peripheral attached that is actually not a keyboard, but all of its buttons are being treated as F keys, they all send the same scancode and keycode as the standard F keys (based of of showkey [-s] and xev). I want to change the keycode of the peripheral without effecting the standard keys, so I seetled on udev to remap the scancodes based on manufacturer.
The problem I'm having now is getting the keys to remap at all using udev. I have created /usr/lib/udev/hwdb.d/90-custom-keys.hwdb for testing (the test version aims to change all keyboards, which I'll adjust once I can get something working) that looks like:
keyboard:usb:v*p*
keyboard:dmi:bvn*:bvr*:bd*:svn*:pn*
keyboard:*
KEYBOARD_KEY_1b=playcd (this should map F1 to keycode 200 like I want)
The peripheral is USB, the added sections are attempted catch alls to get some kind of behaviour change which were each added after the previous didn't help.
Also, udev does appear to be running based off of ps aux | grep udev.
I need to be able to change the keycodes this peripheral sends which will be handled by another application (that requires particular keycode inputs), and I still want to maintain the standard buttons. How can I achieve this?
Environment used:
os: RHEL 7
udev ver: 208
arch: 86_64
|
My issue was putting the wrong scancode, the rule shouldn't be
keyboard_key_1b=playcd
but
keyboard_key_7003a=playcd
You really do require evtest for this (the 'scancodes' provided by showkey -s is not the one you're looking for)
| How to remap an F key on a specific Keyboard? |
1,686,668,221,000 |
Im using CentOS 6.5 workstation, pretty standard config, with normal dell keyboard, EN/US lang and keyboard layout. I have the following in the .Xmodmap
keycode 66 = Control_L
clear Lock
add Control = Control_L
keycode 117 = Caps_Lock
add Lock = Caps_Lock
Which maps Caps to Ctrl as I desire. A few times a day I somehow trigger caps lock, sometimes in the browser, sometimes from the shell, there seems no pattern to it yet there must be. I can't figure out what Im actually pressing after the event, but more to question, what combination would enable one to toggle caps lock when the above config is active?
|
clear lock
clear control
add control = Caps_Lock Control_L Control_R
keycode 66 = Control_L Caps_Lock NoSymbol NoSymbol
This will remap Caps_Lock to control and allow you to use Shift+Caps_Lock to trigger the normal behaviour of Caps_Lock
| Xmodmap remapping Caps, but still triggering Caps Lock |
1,686,668,221,000 |
I plugged a second keyboard into my computer to test something, and now my NumLock light is out of sync with the lock status (the light is off when NumLock is on, and vice-versa). How can I get the two back in sync? I'm running Gentoo Linux, if it matters.
|
This is the expected behavior unter elder Versions of X11 if there is more than a single keyboard (X11 always has a virtual keyboard, so a single physical keyboard acts as a second one; See command xinput).
Newer Kernels and newer X11 synchronize the leds of all keyboards, but for a long time, it was such, that you can invert the NumLock-LED on purpose. AFAICS this is no more possible with newer X11, sigh.
There is a program numlockx which is designed to programmatically set the NumLock status along with all LEDs to a wanted state. However there is no direct way to fix the status if it was disturbed, so you need a short bourne shell script to do so:
numlockx `numlockx status | egrep -o 'on|off'`
Beware! This has a small race condition between state check and forching the state for all keyboards. So better do not run this in background from cron etc., better just run it on-demand when needed.
| Resync NumLock light with NumLock status |
1,686,668,221,000 |
I've made a hardware keylogger for PS/2 (it is connected between keyboard and PC) and it's storing keystrokes directly as keyboard is sending signals. When device dumps data to the computer, everything goes exactly the same as normal keyboard. I'd like to write an application which saves the dump.
When user types only text, there's no problem - I can open any text editor and everything's saved there.
The problem is when user types key combinations like ALT+TAB, CTRL+F1 , CTRL+A and similar.
My question is - how to pass the keyboard keystrokes directly to file ignoring X?
|
You should be able to use the input-events command (on debian from the input-utils package), alternatively you can use xev to see all x-events.
| Getting direct input from keyboard, ignoring X |
1,653,691,202,000 |
I'm using a Tuxedo InfinityBook with elementary OS 0.4.1 Loki.
When I hit FN + VOL. UP/DOWN, the changes only take effect on every second hit. So, to lower or raise the volume by one step, I have to hit FN + VOL. UP/DOWN] twice.
I noticed that the system seems to "save the state" of the volume bar even though no changes take place: When I hit FN + VOL. DOWN and FN + VOL. UP in a row, nothing happens, but when I do the same again after that, the volume first decreases and then increases by one step, as one would expect. I hope, this is understandable.
Strange thing is, this bug is also present when I boot another OS from a Live USB...
Also, the "underlying buttons", which are "?" and "`´" in my case, work normally.
I tried to set other key combinations to raise/lower volume via dconf-editor (e.g. "Super + O"), then it works fine! I want to use my native media keys for this though, so this is not an acceptable workaround.
Typing gsettings reset org.gnome.settings-daemon.plugins.media-keys volume-up in the terminal, as suggested by many, also doesn't solve it.
This problem only occurs with the volume buttons, e.g. the brightness keys, mute key,... work as expected.
I've run out of ideas by now – maybe anyone has experienced similar issues and managed to solve them?
|
Turned out this could be reproduced by the manufacturer, but they won't put any effort into it because my notebook from 2015 is apparently too old... Seems to be related to something on hardware side, so I don't see a realistic chance to get this fixed and therefore closing this thread.
| Volume keys only react on every second hit |
1,468,440,580,000 |
I have a laptop with a Bluetooth Broadcom 43142 module, and I had to copy firmware for it from Windows. Also I have a Samsung Bluetooth Keyboard BKB-10.. Itt worrrks fine with Windoows 10, but under Ubuntu 16.04 it hangs, disconnects, laggy.
Example of hangs:
Likkkkkkkkkke tttttttttttthhhhhhhhhhhhhhhhhatt!!!!!!!!!
If it disconnects, than just 1 key is pressed for 10-20 seconds, until system understands it is disconnected. But it can print also just 1-10 extra letters without any disconnects.
DDelayys can be from milliseconds to seconds. But sometimes the keyboard works perfectly well under Linux too, and I cannot see any patterns when it does and does not work well.
Because of problems with Bluetooth drivers under Linux for that adapter I thought that drivers are the problem. But then I connected the keyboard to my CyanogenMod 12.1 smartphone, and it is laggy there too! I did not see disconnects, and I not know where to look for logs in Android for Bluetooth disconnects. CM 12.1 use Bluez also, so maybe it is the problem. And again, keyboard can work perfectly well under Linux too. So, I guess it is just Linux, not drivers or hardware problems.
I turned off in tlp all power savings for USB and PCI devices, tried 2 fist solutions from here – nothing.
Also installed Bluez 5.40 (without removing 5.37 Ubuntu version, or I would delete half Ubuntu) and Linux kernel 4.6. Nothing strange appears in logs while keyboard is unstable (laggy and hanging), only if it disconnects.
Another funny thing is that that keyboard is made for Android, but it works well under Windows only.
unknown main item tag 0x0
appears every time it disconnects.
Note that the above message is bolded in the display below.
dmesg
[ 440.590111] usbcore: deregistering interface driver btusb
[ 444.549055] usbcore: registered new interface driver btusb
[ 446.557936] Bluetooth: hci0 command 0x1001 tx timeout
[ 454.551817] Bluetooth: hci0: BCM: Reading local version info failed (-110)
[ 454.568686] Bluetooth: hci0: BCM: chip id 70
[ 454.584662] Bluetooth: hci0: BCM43142A
[ 454.584671] Bluetooth: hci0: BCM (001.001.011) build 0000
[ 455.217642] Bluetooth: hci0: BCM (001.001.011) build 0146
[ 455.233625] Bluetooth: hci0: Broadcom Bluetooth Device (43142)
[ 520.262176] usbcore: deregistering interface driver btusb
[ 520.267674] Bluetooth: hci0 urb ffff88005b287c00 failed to resubmit (2)
[ 522.576757] usbcore: registered new interface driver btusb
[ 522.581012] Bluetooth: hci0: BCM: chip id 70
[ 522.597023] Bluetooth: hci0: Broadcom Bluetooth Device (43142)
[ 522.597032] Bluetooth: hci0: BCM (001.001.011) build 0146
[ 523.200996] Bluetooth: hci0: BCM (001.001.011) build 0146
[ 523.217028] Bluetooth: hci0: Broadcom Bluetooth Device (43142)
[ 523.350764] Bluetooth: RFCOMM TTY layer initialized
[ 523.350772] Bluetooth: RFCOMM socket layer initialized
[ 523.350779] Bluetooth: RFCOMM ver 1.11
[ 532.571301] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 532.571308] Bluetooth: HIDP socket layer initialized
[ 793.617198] hid-generic 0005:04E8:7021.0003: unknown main item tag 0x0
[ 793.617387] input: Samsung Bluetooth Keyboard BKB-10 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci0/hci0:12/0005:04E8:7021.0003/input/input14
[ 793.618079] hid-generic 0005:04E8:7021.0003: input,hidraw2: BLUETOOTH HID v7.00 Keyboard [Samsung Bluetooth Keyboard BKB-10] on f8:2f:a8:ed:4d:02
[ 978.540391] hid-generic 0005:04E8:7021.0004: unknown main item tag 0x0
[ 978.540524] input: Samsung Bluetooth Keyboard BKB-10 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci0/hci0:11/0005:04E8:7021.0004/input/input15
[ 978.542916] hid-generic 0005:04E8:7021.0004: input,hidraw2: BLUETOOTH HID v7.00 Keyboard [Samsung Bluetooth Keyboard BKB-10] on f8:2f:a8:ed:4d:02
[ 2922.936556] hid-generic 0005:04E8:7021.0005: unknown main item tag 0x0
Jun 14 15:58:53 leonid-Lenovo-G500 acpid: input device has been disconnected, fd 16
Jun 14 15:58:53 leonid-Lenovo-G500 bluetoothd[694]: GLib: Source ID 1006 was not found when attempting to remove it
Jun 14 15:58:54 leonid-Lenovo-G500 kernel: [ 7143.006495] hid-generic 0005:04E8:7021.000F: unknown main item tag 0x0
Jun 14 15:58:54 leonid-Lenovo-G500 kernel: [ 7143.006620] input: Samsung Bluetooth Keyboard BKB-10 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci0/hci0:12/0005:04E8:7021.000F/input/input26
Jun 14 15:58:54 leonid-Lenovo-G500 kernel: [ 7143.007582] hid-generic 0005:04E8:7021.000F: input,hidraw2: BLUETOOTH HID v7.00 Keyboard [Samsung Bluetooth Keyboard BKB-10] on f8:2f:a8:ed:4d:02
Jun 14 15:58:54 leonid-Lenovo-G500 upowerd[1464]: (upowerd:1464): UPower-Linux-WARNING **: treating change event as add on /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci0/hci0:12/0005:04E8:7021.000F/power_supply/hid-90:7f:61:10:3c:ab-battery
Jun 14 16:01:53 leonid-Lenovo-G500 acpid: input device has been disconnected, fd 16
Jun 14 16:01:53 leonid-Lenovo-G500 bluetoothd[694]: GLib: Source ID 1035 was not found when attempting to remove it
Jun 14 16:01:53 leonid-Lenovo-G500 kernel: [ 7322.201743] hid-generic 0005:04E8:7021.0010: unknown main item tag 0x0
Jun 14 16:01:53 leonid-Lenovo-G500 kernel: [ 7322.201902] input: Samsung Bluetooth Keyboard BKB-10 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci0/hci0:11/0005:04E8:7021.0010/input/input27
Jun 14 16:01:53 leonid-Lenovo-G500 kernel: [ 7322.202263] hid-generic 0005:04E8:7021.0010: input,hidraw2: BLUETOOTH HID v7.00 Keyboard [Samsung Bluetooth Keyboard BKB-10] on f8:2f:a8:ed:4d:02
Jun 14 16:01:53 leonid-Lenovo-G500 upowerd[1464]: (upowerd:1464): UPower-Linux-WARNING **: treating change event as add on /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci0/hci0:11/0005:04E8:7021.0010/power_supply/hid-90:7f:61:10:3c:ab-battery
|
Installed Bluez 5.27 from bluez.org (newer are laggy for me) and lags gone away. Less disconnects also, but i guess it is about ubuntu's work with kernel or smth else.
| Laggy, hanging, unstable Bluetooth keyboard with Linux only |
1,468,440,580,000 |
I use the default gEdit on Cinnamon on Linux Mint, but I find when opening files from within it, I cannot navigate the open file dialog solely using the keyboard.
I hasn't been intuitive how I use tab and direction Keys
My config for curious readers in the future:
cat /etc/linuxmint/info
RELEASE=17.2
CODENAME=rafaela
EDITION="Cinnamon 64-bit"
DESCRIPTION="Linux Mint 17.2 Rafaela"
DESKTOP=Gnome
TOOLKIT=GTK
NEW_FEATURES_URL=http://www.linuxmint.com/rel_rafaela_cinnamon_whatsnew.php
RELEASE_NOTES_URL=http://www.linuxmint.com/rel_rafaela_cinnamon.php
USER_GUIDE_URL=help:linuxmint
GRUB_TITLE=Linux Mint 17.2 Cinnamon 64-bit
Virtual Machine Host:
uname -a
Linux ZOXFLI-FQXGR32 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
I host the above from within a Oracle Virtual Box VM running on Windows 7 (SP1). I do not have any known file conflicts from within the VM that are inhibiting this.
|
I have found I can press Alt + Up/Down to navigate up and down the current file path location.
I haven't quite got this next part exactly correct, but if I want to navigate files within the selected path I can press Up or Down usually. Sometimes its a bit unexpected doing this and I use different direction keys or combinations with the Alt key until I get what I'm after. I will update once I have it down pat.
| Using open file dialog within gEdit using keyboard only |
1,468,440,580,000 |
By default, rdesktop grabs keyboard, so that key combinations such as Alt+Tab or Alt+F4 act inside the rdesktop window. This can be overridden with the -K option
rdesktop -K myserver.mydomain.com
Is there any way to chage this during an existing session? I always connect using the -K option, but sometimes I would like to switch so that rdesktop grabs my keyboard.
|
Press CTL+ALT+ENTER to leave full-screen mode. Then you can select a host window from the task bar, or minimize the rdesktop window. As long as the rdesktop window doesn't have focus, it won't capture keyboard events.
Unfortunately, this doesn't appear to simply release the keyboard, the same way right-ctrl would in Remmina or VirtualBox.
| make existing rdesktop session grab keyboard/mouse |
1,468,440,580,000 |
I'm looking to modify my keyboard layout such that holding down Shift and pressing a number key will result in a number being printed to the screen instead of the symbol that's on the key.
For example SHIFT+9 would print 9, while 9 will print (.
I'd also like to switch "[" and "]" with "{" and "}" respectively, in the same manner.
I suspect the program setxkbmap will be useful, but I don't know how to use it for this purpose.
Incidentally, there exists a similar question, but it's not exactly what I'm looking for.
I use Linux Mint 16 Mate Edition.
|
You will need to use xev and xmodmap.
Check out the following answer: https://askubuntu.com/questions/24916/how-do-i-remap-certain-keys
About halfway down the answer it addresses using the shift key.
For example, in the case of the 9 key:
xmodmap -e "keycode 18 = parenleft 9"
From the man pages:
keycode NUMBER = KEYSYMNAME ...
The list of keysyms is assigned to the indicated keycode (which
may be specified in decimal, hex or octal and can be determined
by running the xev program). Up to eight keysyms may be
attached to a key, however the last four are not used in any
major X server implementation. The first keysym is used when
no modifier key is pressed in conjunction with this key, the
second with Shift, the third when the Mode_switch key is used
with this key and the fourth when both the Mode_switch and
Shift keys are used.
| swap symbols with numbers in keyboard layout |
1,468,440,580,000 |
I needed to replace a Gyration remote control (which was for controlling MythTV) and it is no longer made. So I got a Keyspan TSBX-2404. It works in the sense that it communicates with the box (Fedora 15) but unlike the Gyration it sends multiple keypresses whenever I hit a button. For example, in xev if I press a button it will give 4-6 entries. It is controlling MythTV this way too--for example hitting the right arrow key will scroll two stops in a horizontal list rather than one. This is not acceptable, and I am wondering if there is some way to deal with it. For example, is there a setting in X that will filter out multiple keypresses that happen within a certain amount of time?
|
What you want to do is turn on BounceKeys. I've never needed that, and I'm not quite sure how you turn it on in Fedora 15, but maybe that will give you something to search for.
| Preventing multiple keypresses from RF remote |
1,468,440,580,000 |
I want to run my script when pressing Ctrl+Shift in i3. But when I'm trying to map a custom command to Ctrl+Shift in ~/.config/i3/config it doesn't work. For example:
bindsym Control+Shift exec chromium
I thought maybe you can't bindsym without $mod, but
Control+1 works fine.
$mod+Control+Shift also works.
I asked a question recently but then realized maybe I'm asking the wrong one.
|
short: no
long:
Control and Shift are usually just modifiers
That is, they are applied to a non-modifier key, such as your example 1.
The i3 user guide tells you which keys are modifiers, in Section 4.3:
Available Modifiers:
Mod1-Mod5, Shift, Control
Standard modifiers, see xmodmap(1)
as well as mentioning the syntax:
bindsym [--release] [<Group>+][<Modifiers>+]<keysym> command
While you could in principle change your keyboard configuration (so that those keys could be treated differently), you'd find it inconvenient to use i3 and other applications without the modifiers.
| Can I map something to Ctrl+Shift in i3? |
1,468,440,580,000 |
I am trying to learn the basics of Unicode and UTF-8, and it so going very smoothly so far. I know that it is possible to chose the encoding of a file when opening it.
When I type text using the keyboard in a text editor (Gedit or Vim) or a command prompt, what is the encoding being sent by the keyboard to the application? Is it different on Windows machines? Can it be configured?
|
See How do keyboard input and text output work? for an overview of the topic. It depends whether the application is running in a terminal or is talking directly to the GUI environment.
In a terminal, the terminal software (generally a terminal emulator this century) determines the encoding of characters. It conveys the character encoding (the same for input and output) by setting the locale environment variable LC_CTYPE. If this variable is unset or set to C, the terminal isn't providing any information so the application can't know what the encoding is. In a terminal, characters are sent to the application as characters; non-character input (function keys, cursor keys, keys with modifiers such as Alt, etc.) is sent as escape sequences (a few of them as control characters instead).
X11 applications receive input in the form of KeyPress envents. KeyPresss events contain a low-level indication (keycode which roughly corresponds to the physical location of the key, and state which encodes the active modifiers). The application can call a function such as XLookupString (traditional function, limited to Latin-1) or XmbLookupString (function supporting other unibyte encodings) or XwcLookupString (function supporting multibyte encodings) or Xutf8LookupString (modern UTF-8 function) to convert this raw information to a character string.
The mapping from keys to characters can be changed at various levels; How do keyboard input and text output work? has an overview.
| Keyboard input encoding |
1,656,171,758,000 |
Whenever I reattach a USB keyboard to my FreeBSD desktop, my keyboard settings are not reapplied to my newly attached keyboard (setxkbmap -option ctrl:nocaps in particular).
I would like to run setxkbmap -option ctrl:nocaps (or perhaps something more like su - username -c 'DISPLAY=:0 setxkbmap -option ctrl:nocaps') whenever I attach a USB keyboard.
What I've tried
xorg.conf
I've tried to use Xorg configuration files to achieve what I want to I added the following contents to /usr/local/etc/X11/xorg.conf.d/99-input.conf:
Section "InputClass"
Identifier "Keyboard Defaults"
MatchIsKeyboard "yes"
Option "XkbLayout" "pl"
Option "XkbOption" "ctrl:nocaps"
EndSection
Unfortunately, if I unplug and plug the USB keyboard back again when the Xorg environment is already running, the Caps Lock on the keyboard is back to being a Caps Lock (interestingly, the Caps Lock on the laptop's keyboard is still mapped to Control).
So...
How do I do it?
|
You should not use devd (on FreeBSD) or udev (on Linux) for that.
Any X11 client can use the XInput/XInput2 extension to monitor when X11 input devices like mice or keyboards are added or removed.
No need to run as root from devd/udev, mess up X11 authentication and commit layer violations, cope with devd/udev's limitations, assume that it's a single user machine, etc.
Implementing such a program is trivial; however, as almost everything interesting, doing it from the shell is messy.
There's a program called inputplug which should allow you to run a shell script when different XInput events happen. However, I've only tried it, I do not use it myself, so I cannot vouch for it.
But it does compile (with a little help) on FreeBSD, and it seems to work as expected. YMMV.
(as root: pkg install libX11 libXI libxcb)
git clone --depth 1 https://github.com/andrewshadura/inputplug
cd inputplug
cc -Wall -include signal.h -I /usr/local/include -L /usr/local/lib -lXi -lxcb -lxcb-xinput inputplug.c -o inputplug
echo 'echo "$@"' > xishow; chmod 755 xishow
./inputplug -c ./xishow
...
XISlaveRemoved 18
XIDeviceDisabled 14 XISlaveKeyboard
XISlaveRemoved 14
XIDeviceDisabled 15 XISlaveKeyboard
XISlaveRemoved 15
XISlaveAdded 12 XIFloatingSlave Telink Wireless Receiver Mouse
XIDeviceEnabled 12 XISlavePointer Telink Wireless Receiver Mouse
XISlaveAdded 13 XIFloatingSlave Telink Wireless Receiver
XIDeviceEnabled 13 XISlaveKeyboard Telink Wireless Receiver
[etc]
| How to configure devd on FreeBSD to run a program whenever a USB keyboard is attached? |
1,656,171,758,000 |
When I run a script like
read -n 1 -p 'Enter first variable: ' var1
if echo "${var1}" | grep -iq "^y"
then
echo "okay"
else
echo "not okay"
fi
sleep 2
read -n 1 -p 'Enter second variable: ' var2
if echo "${var2}" | grep -iq "^y"
then
echo "okay"
else
echo "not okay"
fi
If I run this code, hit y and then hit n in span of 2 seconds, the n is saved in buffer and given to the next read which is why it doesn't wait and ask for user input for Enter second variable:, it simply gives the key in buffer i.e n here.
For making myself clear, I am paraphrasing my question in different words in the following questions but the question is just one.
How do I stop keys being buffered to the memory ? OR
How do I ignore the user input in the buffer for second variable var2 ? OR
How do I disable/ignore keyboard input in between my first and second read so that whatever I type in the span of 2 seconds after the first read, it does not go as an input to the second read
|
You'd want to call the tcflush() POSIX function, to flush the pending input.
For instance with:
perl -MPOSIX -e 'tcflush 0,0'
| How to ignore keyboard input buffer in between two `read` |
1,656,171,758,000 |
I've been working on a small script today for our minimal server here where I can log into our inventory software, download the csv and put it into the web directory using a cron job periodically.
Using script and scriptreplay I was able to get all this working perfectly, until I realized that scriptreplay was literally replaying the terminal output as opposed to the actual website I was loading using w3m the first time.
So I'm looking for a way to record keystrokes via ssh in order to follow my initial instructions.
Does anyone have any ideas? Failing that, does anyone have any alternatives? It's only a mini version of Ubuntu our server is running so no GUI.
|
So after a lot of back and forth with Caleb we've finally come up with a solution to the problem. The login i was trying to do straight to the inventory management software was fiddly, but to quote as per our back and forward conversations tonight, this solved it. No need for recording keystrokes at all. Just good old noggin usage.
The first connection in your script is to login and create a session in a cookie:
curl -s -c cookiejar.txt -b cookiejar.txt -L -d '[email protected]&pass=******' -e 'https://my.channelgrabber.com/login.php' https://my.channelgrabber.com/login.php -o /dev/null
Next you can ask for another page, but you have to pass the previous one you were on. For example after the above, you can run:
curl -s -c cookiejar.txt -b cookiejar.txt -L -e 'https://my.channelgrabber.com/index.php' https://my.channelgrabber.com/products.php -o products.html
Doing this brought about what i needed perfectly. From here, i just deleted the cookie once it had been used and retrieved what i needed:
rm -rf cookiejar.txt
...and set it on a cron job to run every 5 minutes. There's some extra lines i did regarding the full function but this right here is what fixed everything for me. It was a lot of trial and error. A big thank you again to Caleb who helped me with this whole thing.
| Record keystrokes through ssh and be able to replay them |
1,656,171,758,000 |
When using the keyboard on my thinkpad x201, I cannot press left, up and space at the same time. That is, when I start pressing the keys one after the other, the third one will be ignored.
I verified this with pygame, xev and evtest.
How can this be fixed? I don't even know where to start debugging this.
Update: The same thing happens when with either g, h, b, or n instead of space. But it works with other combinations, e.g. left+space+g.
|
This is a hardware issue with Matrix keyboards. Vendors put them in notebooks and sell most of the keyboard with Matrix technology, because they are cheaper in comparison to most mechanical keyboards.
If you try to push three buttons on your keyboard, which use the same data lines, one key might be ghosted.
Wikipedia explains it very well: https://en.wikipedia.org/wiki/Rollover_(key)
If you really need to push these three buttons or more, it is advisable to buy mechanic keyboard. Some of these connect to your computer as "multiple" keyboards. It is possible to push every button on the keyboard and it will be recognized.
| left+up+space keys not working on thinkpad x201 |
1,656,171,758,000 |
During install of an LG ultra laptop ( 17U70P ), the mouse work correctly, but the keyboard stop reacting after booting into "Graphical Install".
I was looking in the bios configuration, and found not specific option that could enable or restore this situation.
The keyboard is required to connect to the wifi (I have an additional USB with the firmware). I have no external keyboard to test.
How to get the laptop keyboard working during install?
Related question, which did not solved my case:
USB keyboard doesn't work with Debian installer
linux /install.amd/vmlinuz vga=788 --- quiet noapic nolapic
or
linux /install.amd/vmlinuz vga=788 --- quite iommu=soft
Did not worked, the first freeze, while the second keeps the keyboard not working.
|
Finally! I found the problem and I've been using the laptop keyboard without any issue under Linux.
This laptop has the same problem as described in this thread in kernel.org, seems like the kernel is not properly handling the parameters of an IRQ. Following the ideas of the submitted patches in that thread I created this patch, I already tried it and works all right:
--- a/linux-6.1.8/drivers/acpi/resource.c 2023-01-24 07:24:44.000000000 +0100
+++ b/linux-6.1.8/drivers/acpi/resource.c 2023-01-27 20:47:52.241298057 +0100
@@ -471,6 +471,18 @@ static const struct dmi_system_id schenk
{ }
};
+static const struct dmi_system_id lg_laptop[] = {
+ {
+ .ident = "LG Electronics 17U70P",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"),
+ DMI_MATCH(DMI_BOARD_NAME, "17U70P"),
+ },
+ },
+ { }
+};
+
+
struct irq_override_cmp {
const struct dmi_system_id *system;
unsigned char irq;
@@ -486,6 +498,7 @@ static const struct irq_override_cmp ove
{ lenovo_laptop, 6, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, true },
{ lenovo_laptop, 10, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, true },
{ schenker_gm_rg, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true },
+ { lg_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
};
static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
PS. Keyboard backlit is not working yet, I'm still looking into that
Update 2/27/23: Yesterday managed to turn on the backlit! Unless I receive some help I guess is gonna take a little bit to properly integrate in the current LG Gram WMI driver, so if in the meantime anybody is interested please ask me the patch.
Update 2/28/23: I filled this bug in kernel.org for this specific laptop model, look here for additional patches/notes.
| Keyboard not working during Debian Install on LG Ultra laptop |
1,656,171,758,000 |
The KDB Project and the XKB both handle the keyboard and keymaps?
Why they both have files for Keyboard Layouts (KDB with .map files and XKB with the Symbols folder)?
What exactly each project do?
|
They do the exact same thing. But different on how they do it and what is required from user to configure them.
Why there are two of them? That is easy: there are many more than just two... iBus, fcitx, xim That is just most famous and usable.
The XKB was first, it is nice and works fine, but has lots of limitations. XIM was an attempt to rectify the problem of working with non-alhphabetical languages. Not exactly successful, so iBus was invented.
Then some people thought that alphabet-based language is enough, but XKB is not very convenient to use, so they made KBD. Same happens with iBus and fcitx. More or less successful attempts to do the same but in a better way.
Nowadays it is more a mater of taste and habit. Majority people use XKB since it comes as default in majority of distributions. If a person feels adventurous or require a custom layout and tired of fighting with XKB - such person uses KBD. Same for languages like Japanese or Chinese but with iBus vs Fcitx.
| What is the difference between KBD and XKB? |
1,656,171,758,000 |
I'm trying to set up a convenient compose key to use for practicing Greek in duolingo. But, I don't want it to mess up my normal use of my laptop. I'm a developer by trade and use pretty much all of the normal single key options shown in the "Position of Compose key" settings in Linux regularly on my laptop, with the exception of the Menu key. However, my new laptop doesn't have a menu key. :-P
So, I wanted to try the "3rd level of Caps Lock" or any of the "3rd level" settings (see screenshot below for the settings I'm talking about).
But...having tried one, I'm not sure how to actually use it. I've tried searching, but all the info I've found about "3rd level keys" is when using a key as a modifier (e.g., holding Caps Lock and a simultaneously to get some modifier of a). That's not working though.
If I use one of these "3rd level of X" settings...how do I actually use it? :)
For reference, my distro is Linux Mint 19.3 (Tessa) using Cinnamon. Which is based on Ubuntu 18.04.
|
You will reach the third level by holding "AltGr".
In order to compose e.g. "å" using "3rd level of Left Win" do the following:
press and hold "AltGr", press "Left Win", release both and press "a" twice.
| How to use "3rd level of Caps Lock" as a compose key on Linux Mint 19.3 (based on Ubuntu 18.04)? |
1,656,171,758,000 |
I have a handful of HP-UX machines that I have to work on and it really annoying to have to use the left arrow key for a backspace and have backspace type '^?'. The systems are using HP-UX 11.31. Is there a command or a series of commands that will cause the HP-UX os to correctly align with the modern keyboard?
|
Try stty erase <press backspace>.
| HP-UX - Unable to use the backspace on ssh connection |
1,656,171,758,000 |
On my linux (ubuntu) with KDE, when i press CTRL+F9 the system shows all the opened windows as miniatures, allowing me to select one by clicking on it.
Unfortunately, the very same key combination is used by my developing IDE (rubymine) as a debug shortcut (it shows the evaluate expression window, used frequently while debugging).
How can i remove it from the combinations managed by the system?
Moreover, I've noticed that:
on the same system, the ubuntu-native gui (unity) doesn't
intercept this key combination, allowing me to have it sent to
the current application
I've tried the following command that I've
read somewhere:
$ xmodmap -pke
it returns a quite long list of combinations, but the one i'm looking for seems to be not even listed here.
|
Go to System Settings -> Shortcuts and Gestures -> Global Keyboard Shortcuts. From there select KDE component KWin and scrol down to Toggle Present Windows (Current desktop)
| linux with KDE, disable CTRL+F9 combination key |
1,656,171,758,000 |
I have literally no clue what is happening or why.
My computer is relatively new (a couple of months old). I'm running Ubuntu 20.04. I keep the computer in pretty good shape (don't do anything crazy with it, don't eat over it, if it leaves the house it's in a bag, etc.) Recently, and for no good reason, the super key (the Windows key) just stopped functioning. Thinking it was a hardware issue, I opened the console and ran showkey, which showed that when I pressed the key, the console logged keycode 240 press and keycode 240 release. So it's not a hardware issue--the key still works. But the bindings aren't working, and when I press it on its own--which should display all open windows--nothing happens.
What happened here and why? How do I fix this?
|
I've discovered that there is a second "mode" for the super key, which is reached by the Fn-SuperKey combination. When Fn-SuperKey is pressed, the super key will "flash" each time it is pressed, instead of maintaining a sustained input. Pressing Fn-SuperKey again will release that "mode" and return functionality to normal.
I'll continue doing some research as to exactly what this functionality is and why it is exists, but that is what is happening and why.
| Key functionality is disappearing |
1,656,171,758,000 |
I recently I installed Debian 7 in my laptop. I used to use Ctrl+Alt shortcut all the time in Windows, but in Debian 7 I can only use AltGr.
So, I was trying to bind AltGr to Ctrl+Alt without success. First I installed AutoKey but then I didn't know how to use it. Then I installed xbindkeys and tried doing some configuration to get the binding but it didn't work. And I tried more and more things...
At this point I don't know what to do.
AltGr makes me work slowly. There is any way to do the binding without getting head cancer?
|
After some research I learned how to use xbindkeys. I only had to add the following commands to the xbindkeysrc file placed in my personal folder:
# LeftBracket
"xvkbd -xsendevent -text "[""
Control+Alt + dead_grave | m:0xc + c:34
# RightBracket
"xvkbd -xsendevent -text "]""
Control+Alt + plus | m:0xc + c:35
# LeftKey
"xvkbd -xsendevent -text "{""
Control+Alt + dead_acute | m:0xc + c:48
# RightKey
"xvkbd -xsendevent -text "}""
Control+Alt + ccedilla | m:0xc + c:51
# Pipe
"xvkbd -xsendevent -text "|""
Control+Alt+Mod2 + 1 | m:0x1c + c:10
# AtSign
"xvkbd -xsendevent -text "@""
Control+Alt+Mod2 + 2 | m:0x1c + c:11
# Hash
"xvkbd -xsendevent -text "#""
Control+Alt+Mod2 + 3 | m:0x1c + c:12
# Virgulilla (Spanish keyboard)
"xvkbd -xsendevent -text "~""
Control+Alt+Mod2 + 4 | m:0x1c + c:13
# Slash
"xvkbd -xsendevent -text "\""
Control+Alt+Mod2 + masculine | m:0x1c + c:49
After that I added xbindkeys to gnome-session-properties to run xbindkeys at startup.
This way I can use Ctrl+Alt like I used to.
| How to bind AtlGr to Ctrl+Alt in Debian 7 |
1,656,171,758,000 |
For some bizarre reason my 'j' key stopped working properly. Every time I hit the key, it prints "true". If I type 'jake', the terminal prints:
>>trueake
I don't know what lead to this. I guess it was after I installed something. I've tried rebooting, and did not work. How can I fix this?
CTRL-j also prints 'true'.
SHIFT-j works fine.
Xterm works fine.
I'm currently using OpenBSD 4.9.
|
One way to achieve this (I don't know if it's the only one) is to define a macro in Rxvt. Look through your X resources for a line like
Rxvt.keysym.j: true
This could be in your own file (usually ~/.Xresources) or in a system file. Run appres Rxvt to see what resources rxvt is using. If the culprit turns out to be a buggy system file that you don't want to change, I think you can override it by putting a contrary definition in your own resource file:
Rxvt.keysym.j: builtin:
| Strange terminal behavior: 'j' key not working in urxvt |
1,656,171,758,000 |
I wanted to map my PSone gamepad to do some basic KDE/keyboard/mouse functions and everything works well except one thing. I use logitech ultra-x keyboard which has a few multimedia buttons (play, home, volumeup, volumedown..) and I wanted to map volumeup and volumedown keys to my pad with everything else.
volumedown works well, but volumeup makes some trouble. after I start qjoypad and map it - it does work but after mapping it I still see the "[NO KEY]" (while it is doing its job - volumeup; that's strange).. after I turn qjoypad off and on I get this error: "Error reading button 6" and after that "Error reading definition for joystick 0".
This is my layout:
QJoyPad 4.1 Layout File
Joystick 1 {
Axis 4: gradient, dZone 6505, maxSpeed 11, tCurve 2, sens 2, mouse+h
Axis 5: gradient, dZone 6264, maxSpeed 11, tCurve 2, mouse+v
Button 1: key 114
Button 2: mouse 3
Button 3: mouse 1
Button 4: key 113
Button 5: key 122
Button 6: key 123
Button 7: key 62
Button 8: key 105
Button 9: key 23
Button 10: key 65
}
With xev I got it what 122 and 123 are (they work normaly under KDE when I press them, it's just that 123 wont map and stay mapped for my pad)
keycode 122 = XF86AudioLowerVolume
keycode 123 = XF86AudioRaiseVolume
Any hint on what I should do to fix this and make my configuration stay? If it means anything, or helps anyhow - system is arch with 2.6.35 kernel, kde 4.5.1.
|
I just found out how to fix this. If you download the source code for qjoypad, there should be a file called "constant.h". In there, there is a variable called "MAXKEY". The value should be "122", so it just needs to be changed to a higher number (I arbitrarily chose 150). Safe the file and recompile it.
Be forewarned, though, as I have no idea if this breaks any functionality, but I have not encountered anything yet.
| Can't map XF86AudioRaiseVolume key in QJoyPad |
1,656,171,758,000 |
I have an odd issue where the XTEST keyboard on my PC will randomly send the 255 keycode, which turns on the screen if it's off. I've disabled most suspect programs like KDE Connect, but the issue is still there. Is there any way to see which exact process is responsible for the keystroke?
|
I managed to find the culprit through the use of lsof -F c /usr/lib/libXtst.so, which let me see which processes had the XTEST library loaded to send keystrokes.
As it turned out, the culprit was bsnes-plus' implementation of suppressing the screensaver, which, absurdly enough, runs even when the emulator is paused. Thankfully, it's pretty easy to patch out.
| Which process is sending keystrokes? |
1,656,171,758,000 |
If to run xev and press Alt, it generates following event among others:
KeyPress event, serial 37, synthetic NO, window 0xa600001,
root 0x5bc, subw 0x0, time 823983987, (672,346), root:(672,411),
state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
What exactly "Synthetic" means in this context?
|
If synthetic is YES instead of NO, it means that the event is a "fake" one, generated by another X11 client with XSendEvent(3), not by the server.
Many programs (e.g. xterm, firefox) ignore synthetic events (except for ClientMessage events). This is more of a feel-good measure than any kind of real security, because an X11 client can easily generate key and mouse events via the XTest extension (present and enabled by default).
| What "Synthetic" means in xev output? |
1,656,171,758,000 |
I'm setting up key bindings in dwm for things like changing brightness and taking screenshots. In order to bind the appropriate key, I followed someone else's example and added
#define XF86AudioMute 0x1008ff12
to my config.h, and referred to that key in my keybinding.
This works fine, but I have no idea where this value came from or how to find other similar values. For example, the PrtSc button on my keyboard is one that I haven't been able to find a value for.
What are these values, and how do I find them?
|
The definition
#define XF86AudioMute 0x1008ff12
comes from the header file XF86keysym.h, though it's spelled differently:
#define XF86XK_AudioMute 0x1008FF12 /* Mute sound from the system */
To find the keysyms that your keyboard sends, use xev. Not all keys will send keysyms, however (in that case, you can't do much).
Further reading:
What does this output from xev mean?
| How do you find what value a keyboard key has? (dwm keybinding) |
1,656,171,758,000 |
I just have get a Logitech Spotlight Presenter, it has two buttons which have key codes incompatible with my presentation (revealjs).
Next and Previous are binded as Right and Left, while I want to change them to n and p.
I'm using Ubuntu 18.04 and ArchLinux.
The parameter of the device:
$ lsusb -d 046d:c53e -v
Bus 001 Device 012: ID 046d:c53e Logitech, Inc.
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 32
idVendor 0x046d Logitech, Inc.
idProduct 0xc53e
bcdDevice 41.00
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 84
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 4
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 98mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 1 Keyboard
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 59
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 8
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 2 Mouse
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 148
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 2
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 98
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 2
Here are the current show keys:
# showkeys --scancodes
0xe0 0x4d 0xe0 0xcd
0xe0 0x4b 0xe0 0xcb
# showkeys --keycodes
keycode 106 release
keycode 105 release
Here are the show keys according of my keyboard:
# showkeys --scancodes
0x31 0xb1
p0x19 0x99
# showkeys --keycodes
keycode 49 release
keycode 25 release
I have deduced the following /lib/udev/hwdb.d/61-logitech-spotlight-presenter-revealjs.hwdb:
# This file has been created to improve Logitech Spotlight Presenter in revealjs
evdev:input:b*v046dpc53e*
KEYBOARD_KEY_69=p
KEYBOARD_KEY_6a=n
I have then tried the following
$ sudo systemd-hwdb update
$ udevadm trigger
$ sudo udevadm control --reload-rules && udevadm trigger
But my remote still fires Right/Left.
|
The open source software Projecteur allows you to map
the buttons of the Logitech Spotlight (and have a customizable desktop spot)
Project Homepage: https://github.com/jahnf/Projecteur
Packages for arch are also available:
https://aur.archlinux.org/packages/projecteur
For Ubuntu, packages are available on the project's github page as well
as in the Ubuntu repositories 20.10 and later.
Disclaimer: I am the author of Projecteur
| Change key code for a given device |
1,656,171,758,000 |
I recently installed XFCE over my arch - used gnome before.
After some time using XFCE i discovered that my keypress "s" does not work as expected (works first in XFCE without problems).
Output of xev if i press "s" is following:
FocusOut event, serial 37, synthetic NO, window 0x4c00001,
mode NotifyGrab, detail NotifyAncestor
FocusIn event, serial 37, synthetic NO, window 0x4c00001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 37, synthetic NO, window 0x0,
keys: 70 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Output of xev if i press "Shift" + "s" is like it should be:
KeyPress event, serial 37, synthetic NO, window 0x4c00001,
root 0x1ec, subw 0x0, time 1860946, (-385,-70), root:(2406,438),
state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x4c00001,
root 0x1ec, subw 0x0, time 1861443, (-385,-70), root:(2406,438),
state 0x11, keycode 39 (keysym 0x53, S), same_screen YES,
XLookupString gives 1 bytes: (53) "S"
XmbLookupString gives 1 bytes: (53) "S"
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x4c00001,
root 0x1ec, subw 0x0, time 1861535, (-385,-70), root:(2406,438),
state 0x11, keycode 39 (keysym 0x53, S), same_screen YES,
XLookupString gives 1 bytes: (53) "S"
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x4c00001,
root 0x1ec, subw 0x0, time 1862401, (-385,-70), root:(2406,438),
state 0x11, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
As soon as i change to gnome or boot into windows "s" is working like before.
Keyboard is Razor Ultimate 2016 - de-CH Layout
Keyboard layout (German(Switzerland)) in XFCE Setting is correct
Keyboard model is "Generic 105 key PC (intl)"
no application shortcut is bound to "s"
I would say the key press "s" i now bound to another thing - but how to discover or where to change this behavior?
Maybe this is a needed hint: if i try to set an keyboard shortcut (xfce4-keyboard-settings) to the key "s" - it can not be done!
"s" press will be recognized (blinks on press), but keypress can't be bound..
Additional: if i try to set an keyboard shortcut to the window manager - the key "s" will be recognized and can be bound - but the execution will not be triggered.
|
Found it out by myself:
The problem was that I had added a custom keyboard shortcut for xfce4-terminal --drop-down on the key § (on us layout it is the key "tilde") which gets saved in config as <property name="section" type="string" value="xfce4-terminal --drop-down"/>
If I remove this shortcut (or edit it to Super + §), everything works as expected.
| Keyboard key "s" not triggered [closed] |
1,656,171,758,000 |
I have an issue on my Debian computer with Intel Stick.
Link to screenshot =>
I have extra character in console tty like ^[
This issue is only with supperior 4.11.12 kernel
Debian kernel and 4.11.12 kernel is ok
I dont know why
|
This is not your TTY settings, and the reset command (which you could not even execute anyway, as you have not logged in) will gain you nothing. Indeed, in most modern Linux operating systems the terminal has just been reset before running the login program (by dint of systemd's TTYReset=yes setting or otherwise), and that has clearly had no effect.
This is your ⎇ Alt key being stuck down, or the kernel's built-in terminal emulator thinking that it is.
When the kernel's built-in terminal emulator sees ⎇ Alt plus an alphanumeric key, it transmits the character sequence ␛ (U+001B) followed by the character for the key to the input of the line discipline. And ^[ is how the line discipline echoes back an ␛ character when it receives one as input (and it is in canonical mode, as it is here).
So ^[r is how ⎇ Alt+r is echoed back to you.
It's possible for the terminal emulator's idea of what modifier keys are currently pressed to become out of synch with the actual keyboard state, for reasons beyond the scope of this answer. Press and release all of your ⎇ Alt keys, without pressing any of the key chords that switch amongst the kernel VTs, and the state should become synchronized again.
If that does not work, then the next thing to investigate is whether the modifier key is indeed physically stuck down.
Further reading
https://unix.stackexchange.com/a/391968/5132
https://unix.stackexchange.com/a/428865/5132
| Keyboard issue console terminal |
1,656,171,758,000 |
I haven't updated KeyPass 2.x (I'm still on 2.32), so what could have broken this program on Linux Mint 18.1 x64?
It used to be that normal Ctrl+[letter] shortcuts like Ctrl+C to copy, Ctrl+U to open URL in browser, etc. worked fine on this system. Now none of them do. I have to right-click and use context menu options. This persists after a restart. Unfortunately I'm not sure what updated that might have broken this.
It seems the Ctrl part is just being ignored entirely: In any text box within KeyPass where I try to paste with Ctrl+V, it instead types the letter v into the box.
Aside from KeyPass, everywhere else in the system my Ctrl key works just fine for copy/paste/undo/select all/etc. The only exception is that I also recently experienced this in pgAdminIII, but restarting the program (or perhaps my whole computer--not sure which it was) fixed it, because the problem did not persist after that. KeyPass remains broken between cold boots.
What components are at play here? How can I diagnose such a problem?
KeePass 2.x seems to be based on Mono, but I don't have mono-complete installed--I installed from the repo mentioned at https://sourceforge.net/p/keepass/discussion/329220/thread/17d1bd26/#4a47/2783 (IIRC--it was months ago now, and it's been working since then until somewhat recently. But I did seem to have that repo already there when I tried to add it again just now, so unless it didn't work and I installed some other way without cleaning up the repo, that's the version I have. From the rest of that thread I gather that the version I have has whatever it needs from Mono already compiled in?)
For lack of other ideas, after all the above, I upgraded to KeePass 2.36. It still has this behaviour.
Also it doesn't matter if I use left or right Ctrl, or even both at the same time.
|
I just switched to KeePassXC 2.2.0 (oldstable) and it works fine in the above regard, and was able to open existing database files from KeePass2.
This doesn't really answer the question as to what caused the above, but it's a useful solution, at least.
| Why do [Ctrl]+[letter] shortcuts suddenly not work anymore in KeePass 2.x under Linux Mint, while most other programs are fine? [closed] |
1,656,171,758,000 |
So, I've recently purchased the named keyboard and have been doing some reverse engineering as to how the Logitech Gaming Software does things with it.
In this process I've discovered that a few magic packets are sent to the device to unbind the default f1-6 from g1-6; however after this part things get tricky. None of the special keys (m1-3, mr, g1-6) report any scancode according to any standard tool, and that they all send hid reports on the same usage, ff00.0003, using bitwise logic.
Each key sends an hid report in the following format:
03 gg mm where gg is g# = (0x01 << #-1) and mm is m# = (0x01 << #-1) [mr treated as m4 for this math), so pressing g1 and g2 at the same time yields
04 03 01 and so on; the values are ANDd together.
As such, I cannot find any particularly useful way of mapping these hid reports to a known scancode (say, BTN_TRIGGER_HAPPY?) for easy userspace remapping with xbindkeys or the like.
You can find an extensive dump of information on this keyboard at https://github.com/GSeriesDev/gseries-tools/blob/master/g105/info , if its of any help.
|
There is now a Linux driver for the Logitech G105 Keyboard, it's called sidewinderd, available on github.
| Map non-standard hid reports to scancodes for Logitech G105 Gaming Keyboard |
1,656,171,758,000 |
I'm trying to install OpenBSD 5.6 amd64 on my 2012 Mac mini (quad-core Intel i7), but USB stops working partway through the boot sequence, as evidenced by my lighted keyboard going dark. Without a working keyboard, I am unable to proceed through the installer.
The keyboard works just fine during installation and use under OpenBSD 5.5 amd64 on this Mac mini. Attempting to boot the 5.6 installer on another Mac mini (dual-core i5) also results in the same issue, so it's not something wonky with this particular machine.
I have tried install56.iso, install56.fs, cd56.iso, and bsd.rd from the release version of 5.6. I have also tried install56.iso from two recent snapshots. None of these work.
Here's the text output on the screen as it boots, videoed and hand-transcribed (there might be typos):
CD-ROM: 90
Loading /5.6/AMD64/CDBOOT
probing: pc0 mem[568K 63K 511M 510M 1197M 80K 2M 14070M a20=on]
disk: hd0+ hd1+ sd0* cd0
>> OpenBSD/amd64 CDBOOT 3.23
boot>
cannot open cd0a:/etc/random.seed: No such file or directory
booting cd0a:/5.6/amd64/bsd.rd: 3189664+1368975+2401280+0+517104 [72+350160+227754]=0x7b0838
entry point at 0x1000160 [7205c766, 34000004, 24448b12, 6670a304]
kbc: cmd word write error
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2014 OpenBSD. All rights reserved. http://www.OpenBSD.org
OpenBSD 5.6-current (RAMDISK_CD) #551: Fri Nov 21 10:20:00 MST 2014
[email protected]:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
RTC BIOS diagnostic error 7f<ROM_cksum,config_unit,memory_size,fixed_disk,invalid_time>
real mem = 17065648128 (16275MB)
avail mem = 16610545664 (15841MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0000 (83 entries)
bios0: vendor Apple Inc. version "MM61.88Z.0106.B04.1309191433" date 09/19/2013
bios0: Apple Inc. Macmini6,2
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC SBST ECDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT DMAR MCFG
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz, 2295.13 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,MCOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu0: 256KB 64b/line 8-way L2 cache
(There's a discontinuity here, there might be some lines missing)
ppb2 at pci2 dev 0 function 0 vendor "Intel", unknown product 0x1547 rev 0x03: msi
pci3 at ppb2 bus 6
vendor "Intel", unknown product 0x1547 (class system subclass miscellaneous, rev 0x03) at pci3 dev 0 function 0 not configured
ppb3 at pci2 dev 3 function 0 vendor "Intel", unknown product 0x1547 rev 0x03: msi
pci4 at ppb3 bus 7
ppb4 at pci2 dev 4 function 0 vendor "Intel", unknown product 0x1547 rev 0x03: msi
pci5 at ppb4 bus 56
ppb5 at pci2 dev 5 function 0 vendor "Intel", unknown product 0x1547 rev 0x03: msi
pci6 at ppb5 bus 105
ppb6 at pci2 dev 6 function 0 vendor "Intel", unknown product 0x1547 rev 0x03: msi
pci7 at ppb6 bus 106
vga1 at pci0 dev 2 function 0 "Intel HD Graphics 4000" rev 0x09
wsdisplay0 at vga1 mux 1: console(80x25, vt100 emulation)
"Intel 7 Series xHCI" rev 0x04 at pci0 dev 20 function 0 not configured
"Intel 7 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
ehci0 at pci0 dev 26 function 0 "Intel 7 Series USB" rev 0x04: apic 2 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHIC root hub" rev 2.00/1.00 addr 1
"Intel 7 Series HD Audio" rev 0x04 at pci0 dev 27 function 0 not configured
ppb7 at pci0 dev 28 function 0 "Intel 7 Series PCIE" rev 0xc4: msi
pci8 at ppb7 bus 1
bge0 at pci8 dev 0 function 0 "Broadcom BCM57766" rev 0x01, unknown BCM57766 (0x57766001): msi, address [removed]
bgrphy0 at bge0 phy1: BCM57765 10/100/1000baseT PHY, rev. 1
sdhc0 at pci8 dev 0 function 1 "Broadcom SD Host Controller" rev 0x01: apic 2 int 17
sdhc0 at 0x10: can't map registers
ppb8 at pci0 dev 28 function 1 "Intel 7 Series PCIE" rev 0xc4: msi
pci9 at ppb8 bus 2
vendor "Broadcom", unknown product 0x4331 (class network subsclass miscellaneous, rev 0x02) at pci9 dev 0 function 0 not configured
ppb9 at pci0 dev 28 function 2 "Intel 7 Series PCIE" rev 0xc4: msi
pci10 at ppb9 bus 3
"AT&T/Lucent FW643 1394" rev 0x08 at pci10 dev 0 function 0 not configured
ehci1 at pci0 dev 29 function 0 "Intel 7 Series USB" rev 0x04: apic 2 int 22
usb1 at ehic1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
"Intel HM77 LPC" rev 0x04 at pci0 dev 31 function 0 not configured
ahci0 at pci0 dev 31 function 2 "Intel 7 Series AHCI" rev 0x04: msi, AHCI 1.3
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0: <ATA, Samsung SSD 850, EXM0> SCSI3 0/direct fixed
naa.50025388a069068d
sd0: 244198MB, 512 bytes/sector, 500118192 sectors, thin
sd1 at scsibus0 targ 1 lun 0: <ATA, Samsung SSD 850, EXM0> SCSI3 0/direct fixed
naa.50025388a0690757
sd1: 244198MB, 512 bytes/sector, 500118192 sectors, thin
"Intel 7 Series SMBus" rev 0x04 at pci0 dev 31 function 3 not configured
isa0 at mainbus0
com0 at isa0 port 0x3f8/8 irq 4: ns8250, no fifo
uhub2 at uhub0 port 1 "vendor 0x8087 product 0x0024" rev 2.00/0.00 addr 2
uhub3 at uhub1 port 1 "vendor 0x8087 product 0x0024" rev 2.00/0.00 addr 2
uhub4 at uhub3 port 8 "vendor 0x0424 product 0x2512" rev 2.00/b.b3 addr 3
uhub5 at uhub4 port 1 "Apple Inc. BRCM20702 Hub" rev 2.00/1.00 addr 4
uhidev0 at uhub5 port 1 configuration 1 interface 0 "vendor 0x05ac product 0x820a" rev 2.00/1.00 addr 5
uhidev0: iclass 3/1, 1 report id
ukbd0 at uhidev0 reportid 1
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub5 port 2 configuration 1 interface 0 "vendor 0x05ac product 0x820b" rev 2.00/1.00 addr 6
uhidev1: iclass 3/1, 2 report ids
uhid at uhidev1 reportid 2 not configured
"Apple Inc. Bluetooth USB Host Controller" rev 2.00/0.79 addr 7 at uhub5 port 3 not configured
uhidev2 at uhub4 port 2 configuration 1 interface 0 "Apple, Inc. IR Receiver" rev 2.00/1.00 addr 8
uhidev2: iclass 3/0, 38 report ids
uhid at uhidev2 reportid 36 not configured
uhid at uhidev2 reportid 37 not configured
uhid at uhidev2 reportid 38 not configured
softraid0 at root
scsibus1 at softraid0: 256 targets
softraid0: trying to bring up sd2 degraded
sd2 at scsibus1 targ 1 lun 0: <OPENBSD, SR RAID 1, 005> SCSI2 0/direct fixed
sd2: 244190MB, 512 bytes/sector, 500102858 sectors
softraid0: roaming device -> sd1a
root on rd0a swap on rd0b dump on rd0b
erase ^?, werase ^W, kill ^U, intr ^C, status ^T
Welcome to the OpenBSD/amd64 5.6 installation program.
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell? _
There is some mention of USB and the keyboard as it's booting, but at this point my backlit keyboard is unlit and pressing keys doesn't do anything. No other keyboard I have works. I have tried plugging in the keyboard to all the USB ports on the system, it does not help.
Any ideas what the problem could be? Is there any way to control this system without needing a USB keyboard?
|
I don't know what the issue was, but it appears to have been fixed in the current branch. You can download a snapshot (e.g. from http://ftp3.usa.openbsd.org/pub/OpenBSD/snapshots/amd64/ or another mirror) and it should work now.
| USB not working in OpenBSD 5.6 installer |
1,656,171,758,000 |
I'm attempting to connect my Logitech k810 usb keyboard to my Debian Jessie machine.
Connecting using this guide has worked well in the past.
The problem is that a step in the guide requires the package bluez-simple-agent.
Apparently that package is no longer a part of bluez.
How can I install bluez-simple-agent or something equivalent?
|
I managed to get it working with
bluetoothctl -a
I guess the -a option is the replacement for bluez-simple-agent. From man bluetoothctl:
-a, --agent=CAPABILITY Register agent handler
| Connecting usb keyboard, bluez-simple-agent missing |
1,656,171,758,000 |
After a dist-upgrade to wheezy, my "k"-Key misbehaves. When typed in a gnome-terminal, no "k" is printed. Instead the terminal seems to grab the focus and will not release it. If I drag-down the mouse outside the terminal it highlights line inside the terminal. Also regular mouse clicks no longer work.
I ran xev an it shows three events when pressing "k"
a FocusIn event
a FocusOut event
a KeymapNotify event
This only happens when I log in through a display manager using my account. It happens with gdm3 and wdm (I have not tested any others)
When I log in as a different user, the "k" key works.
When I log in through a display managaer using a "failsafe" session it also works. Other than that the issue occurs with many different session types.
When startig X from the commandline all is fine. The issue only occurs when logging in through a display manager.
AFAICS all other key work, including the uppercase shift-K
I looked for "dpkg-dist" files in /etc/X11 and only found the following:
./XftConfig.dpkg-dist
./rstart/config.dpkg-dist
So it appears to be related to something attached to my user account. In my dispair I renamed the ~/.config directory, but that didn't resolve the issue.
I am aware of p key doesn't work in X, and I believe it is the same issue, but I have no idea, where I could possibly have remapped the key or how to track this down.
|
Meanwhile I found the answer:
In my case the display-managers start xbinkeys. When starting X from the commandline xbindkeys was (of course) not started. For some reason my .xbindkeysrc bound the letter "k".
The problem disappeared when I killed xbindkeys (which is not a permanent solution) or after I stripped down .xbindkeysrc.
| "k" key sends focus in event |
1,656,171,758,000 |
I ran the following command in my terminal:
setxkbmap -layout us,ru -option "grp:lctrl_lshift_toggle,ctrl:nocaps"
but for some reason, the effect is the same if I specified "grp:ctrl_shift_toggle" - both Left-Shift+Left-Ctrl and Right-Shift+Right-Ctrl change my layout. How can I fix it?
|
probably it is a remaining of a previous configuration
If you want to ensure there are no previous options remaining, use -option (that is, an empty option instruction).
If I set:
setxkbmap -layout us,ru -option -option "grp:lctrl_lshift_toggle,ctrl:nocaps"
then I can switch with LShift-LCtrl and RCtrl does not.
| Why grp:lctrl_lshift_toggle still keeps right keys as switch triggers? |
1,656,171,758,000 |
I haven't found the correct keyboard layout for my macbook pro yet.
I've found one that looks like it though (in .xinitrc):
setxkbmap -layout us -variant mac
yet this has one difference: the (',~) key and the (§,±) keys are switched. I've always managed this by editing the corresponding file in §/etc/share/X11/xkbbut it is a drag to have to do this everytimX11` updgrades.
Can it be done from a local file e.g. .xinitrc?
|
The file you want is .xmodmap Have a look at man xmodmap for details on how to set it up.
xmodmap uses the physical keycodes to make the change. You can get those from xev. Launch it, then tap the appropriate keys and see what keycode number pops up.
You should only need two lines in your .xmodmap, both of them looking something like
keycode 49 = grave asciicircum
keycode 15 = <whichever keys are activated in first-level> section plusminus
Those two keycodes, by the way, are wild guesses and probably wrong.
| modify keyboard layout locally |
1,656,171,758,000 |
I have less-than-perfect connection to a Centos & machine via VNC. One problem is a slow echo; a worse one is a keypress repeat. When I type, say, cat, at normal speed, a couple seconds later I see cattttttt. Is it possible to modify the keyboard repeat character delay or just disable it?
|
From what I understand, CentOS defaults to GNOME as its DE. You ought to be able to change it pursuant to this answer on AskUbuntu
These settings are under Settings → Universal Access → Typing → Repeat Keys. You have to click the Repeat Keys row item, which brings up a pop-up dialog with two settings: Delay and Speed.
If that doesn't work / you're running a different DE and you're using X11 as a display server, you can use xset. In the case of your connection, you can turn key repeat off completely with:
$ xset off
Implementation differs if you're using another Wayland compositor.
| How to configure key press repeat delay? |
1,656,171,758,000 |
I'm using Alpine Linux with the following bluetooth related packages installed:
bluez-5.68-r1 x86_64 {bluez} (GPL-2.0-or-later AND BSD-2-Clause AND MIT) [installed]
bluez-btmgmt-5.68-r1 x86_64 {bluez} (GPL-2.0-or-later AND BSD-2-Clause AND MIT) [installed]
bluez-btmon-5.68-r1 x86_64 {bluez} (GPL-2.0-or-later AND BSD-2-Clause AND MIT) [installed]
bluez-doc-5.68-r1 x86_64 {bluez} (GPL-2.0-or-later AND BSD-2-Clause AND MIT) [installed]
bluez-firmware-1.2-r1 x86_64 {bluez-firmware} (GPL-2.0-or-later) [installed]
bluez-hid2hci-5.68-r1 x86_64 {bluez} (GPL-2.0-or-later AND BSD-2-Clause AND MIT) [installed]
bluez-libs-5.68-r1 x86_64 {bluez} (GPL-2.0-or-later AND BSD-2-Clause AND MIT) [installed]
bluez-openrc-5.68-r1 x86_64 {bluez} (GPL-2.0-or-later AND BSD-2-Clause AND MIT) [installed]
bluez-plugins-5.68-r1 x86_64 {bluez} (GPL-2.0-or-later AND BSD-2-Clause AND MIT) [installed]
pipewire-spa-bluez-0.3.74-r0 x86_64 {pipewire} (LGPL-2.1-or-later) [installed]
The bluetooth service is running and I'm also able to connect and use my bluetooth headphones using the command line utility bluetoothctl.
However, when it comes to HID devices (keyboard and mouse) they can be paired, connected and trusted but do not create any input when pressing a key or mouse movement.
To be specific the bluetooth connection of my keyboard shows:
device CE:FE:50:FA:F7:83 (random)
Name: TEX-BLE-1
Alias: TEX-BLE-1
Appearance: 0x03c1 (961)
Icon: input-keyboard
Paired: yes
Bonded: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
UUID: Human Interface Device (00001812-0000-1000-8000-00805f9b34fb)
Modalias: usb:v04D9p2521d0000
Battery Percentage: 0x63 (99)
However absolutely no key registers when pressed. I tried the same keyboard and the mouse on a fresh install of Ubuntu where it works. They keyboard also works flawlessly via its USB-C connection. I'm guessing that I'm missing a package or a specific configuration option of the Bluetooth stack.
|
After a lot of trial and error I was going through the Bluetooth guide at https://wiki.alpinelinux.org/wiki/Bluetooth again and found the error.
As mentioned at the bottom of the guide I installed hidapi and loaded the uhid kernel module.
apk add hidapi
modprobe uhid
After that I removed the keyboard from bluetoothctl and paired it again. Now keys register.
To make the changes permanent I added the module uhid to /etc/modules.
Now the keyboard works even after a restart.
| Bluetooth keyboard/mouse issue on Alpine Linux |
1,656,171,758,000 |
I try to connect Bluetooth low energy (BLE) keyboard (powered with nice!nano MCU) to the Arch Linux device.
Initially, the keyboard was not showing as a Bluetooth device at all, but it was detected after running hcitool lescan.
Then I tried connecting to it via bluetoothctl:
Agent registered
[CHG] Controller 9C:B6:D0:E4:52:C8 Pairable: yes
[bluetooth]# agent KeyboardOnly
Agent is already registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# scan on
Discovery started
[NEW] Device C9:08:85:1C:61:35 Cradio
[bluetooth]# pair C9:08:85:1C:61:35
Attempting to pair with C9:08:85:1C:61:35
Failed to pair: org.bluez.Error.AuthenticationRejected
[bluetooth]# info C9:08:85:1C:61:35
Device C9:08:85:1C:61:35 (random)
Name: Cradio
Alias: Cradio
Appearance: 0x03c1
Icon: input-keyboard
Paired: no
Trusted: yes
Blocked: no
Connected: no
LegacyPairing: no
UUID: Human Interface Device (00001812-0000-1000-8000-00805f9b34fb)
UUID: Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
AdvertisingFlags:
06 .
[bluetooth]# trust C9:08:85:1C:61:35
Changing C9:08:85:1C:61:35 trust succeeded
[bluetooth]# pair C9:08:85:1C:61:35
Attempting to pair with C9:08:85:1C:61:35
Failed to pair: org.bluez.Error.AuthenticationRejected
[bluetooth]# connect C9:08:85:1C:61:35
Attempting to connect to C9:08:85:1C:61:35
Failed to connect: org.bluez.Error.Failed Input/output error
btmon shows the following output:
@ MGMT Command: Pair Device (0x0019) plen 8 {0x0001} [hci0] 3.201866
LE Address: C9:08:85:1C:61:35 (Static)
Capability: KeyboardDisplay (0x04)
@ MGMT Event: Command Complete (0x0001) plen 10 {0x0001} [hci0] 3.201888
Pair Device (0x0019) plen 7
Status: Rejected (0x0b)
LE Address: C9:08:85:1C:61:35 (Static)
= bluetoothd: src/device.c:device_connect_le() ATT bt_io_connect(C9:08:85:.. 6.293285
journalctl output of bluetoothd (-d debug enabled):
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/device.c:btd_device_set_temporary() temporary 0
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/agent.c:agent_ref() 0x557957793970: ref=2
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/device.c:bonding_request_new() Requesting bonding for C9:08:85:1C:61:35
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/agent.c:agent_ref() 0x557957793970: ref=3
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/agent.c:agent_unref() 0x557957793970: ref=2
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/adapter.c:suspend_discovery()
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/adapter.c:adapter_bonding_attempt() hci0 bdaddr C9:08:85:1C:61:35 type 2 io_cap 0x04
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/adapter.c:pair_device_complete() Rejected (0x0b)
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr C9:08:85:1C:61:35 type 2 status 0xb
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/device.c:device_bonding_complete() bonding 0x5579577a4ca0 status 0x0b
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/device.c:btd_device_set_temporary() temporary 1
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/device.c:device_bonding_failed() status 11
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/agent.c:agent_unref() 0x557957793970: ref=1
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/adapter.c:resume_discovery()
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/adapter.c:trigger_start_discovery()
|
I was able to fix this issue by changing ControllerMode property to dual in /etc/bluetooth/main.conf. It was bredr by default.
# Restricts all controllers to the specified transport. Default value
# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
# Possible values: "dual", "bredr", "le"
ControllerMode = dual
Then device was detected by bluetoothctl and connected without any issues.
| BLE keyboard pairing error: Failed to pair: org.bluez.Error.AuthenticationRejected |
1,644,345,090,000 |
I have function keys on my laptop, for instance XF86AudioLowerVolume. I can associate this key with some command in my openbox configuration file, and use it to lower/increase audio volume.
I found the name of this function key with xev command:
KeyRelease event, serial 47, synthetic NO, window 0x1c00001,
root 0x196, subw 0x0, time 85289390, (524,165), root:(525,203),
state 0x10, keycode 174 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
However, for my other function keys, xev does not show proper key names. For instance, the key which is supposed to be used to "decrease screen brightness". When pressed, xev shows NoSymbol:
KeyPress event, serial 43, synthetic NO, window 0x1c00001,
root 0x196, subw 0x0, time 2651872, (850,161), root:(851,199),
state 0x10, keycode 101 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 43, synthetic NO, window 0x1c00001,
root 0x196, subw 0x0, time 2651872, (850,161), root:(851,199),
state 0x10, keycode 101 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
The other, paired key "increase screen brightness" also shows NoSymbol:
KeyPress event, serial 43, synthetic NO, window 0x1c00001,
root 0x196, subw 0x0, time 2653165, (850,161), root:(851,199),
state 0x10, keycode 212 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 43, synthetic NO, window 0x1c00001,
root 0x196, subw 0x0, time 2653165, (850,161), root:(851,199),
state 0x10, keycode 212 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Only the keycode is different for these two keys.
Does it mean I cannot use these keys to associate these with some command?
They clearly work as keyboard keys, why does xev show NoSymbol ?
|
The NoSymbol simply means that there is no predefined name for that key. Those are listed in the file keysymdefs.h, which hasn't changed appreciably in the past twenty-odd years (see this for example, or this).
That file is used to generate a list of names which xev and related programs consult. For xev, that's done using either
XLookupString, or
XmbLookupString.
Either way, it relies upon a table generated from keysymdef.h, as noted in the source code:
makekeys.c
/* Constructs hash tables for XStringToKeysym and XKeysymToString. */
Makefile.am
# Building ks_tables.h requires the makekeys utility
No one really wants to add to that file, because it is a mixture of codes corresponding to (but not matching) Unicode and special function keys such as the one you asked about. Most of the special keys were defined before the X keyboard extension was introduced in the early 1990s, and that (Xkb) essentially settles for just identifying keys according to the row and column where they are found on a keyboard, rather than trying to name everything.
This page has links to tables illustrating how xterm uses key-modifiers. The Name column of Keymap tables is the name used by Xkb, which you can see is usually just row/column, except for very common keys such as ESC (for Escape).
| xev does not show names for function keys |
1,644,345,090,000 |
So I have gotten a Jelly Comb keyboard as a gift for christmas. But the problem is, that according to the manufacturer, the keyboard is intended to be used on Windows. So now I have the following problems:
If I press the Num Lock, the keyboard starts acting weird; most of the keys stop working, except for some numbers and some letters that act as numbers, while the Num Lock can't be turned off anymore. I tried using numlockx off , so that prevents Num Lock from turning on when i connect the keyboard to the computer, but I sometimes like to use numpad, which I cannot do atm.
F1-F12 don't work. The F keys act also as multimedia keys by pressing the Fn, or at least that is how it should be. But in my case, pressing any of the F keys results in some random multimedia action (random as different from the one printed on the key), but when I press it using the Fn key, its effect just changes to some other multimedia action, again to something else than printed on the key.
When I checked the output from xev, I saw that some of the keys have the same key code. For example F11 prints the same output as Fn+F4. Here is the example output:
KeyRelease event, serial 28, synthetic NO, window 0x3e00001,
root 0x5c4, subw 0x0, time 2572602, (456,941), root:(521,1045),
state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False
KeymapNotify event, serial 28, synthetic NO, window 0x0,
keys: 4294967236 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
KeymapNotify event, serial 28, synthetic NO, window 0x0,
keys: 4294967236 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The first one is for some random letter, while the last two are from F11 and Fn+F4.
For additional info, I am running Ubuntu 20.04 with Gnome.
So my question is, if there is any way to use this keyboard normally on linux. I would imagine, that there is some way to 'tell' the OS to interpret the keyboard as Windows does, but I was unsuccessful in finding anything like that.
EDIT:
So as @dirkt recommended, I checked the output of evtest, and I get the following lines for Fn+F11 and F4 respectively:
Event: time 1609244073.713496, type 1 (EV_KEY), code 113 (KEY_MUTE), value 1
Event: time 1609244073.713496, -------------- SYN_REPORT ------------
Event: time 1609244073.738779, type 1 (EV_KEY), code 113 (KEY_MUTE), value 0
Event: time 1609244073.738779, -------------- SYN_REPORT ------------
Event: time 1609244076.661538, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e2
Event: time 1609244076.661538, type 1 (EV_KEY), code 113 (KEY_MUTE), value 1
Event: time 1609244076.661538, -------------- SYN_REPORT ------------
Event: time 1609244076.687504, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e2
Event: time 1609244076.687504, type 1 (EV_KEY), code 113 (KEY_MUTE), value 0
Event: time 1609244076.687504, -------------- SYN_REPORT ------------
Both have the same code (113 KEY_MUTE), but I get an extra line Event: time 1609244076.687504, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e2, when I do not press Fn. The same goes for all the regular keys like letters and numbers. But when I use the F1-F12 in the combination with the Fn key, the line disappears. So my follow up question is, can I make use of that extra line, so that linux distinguishes between keys with the same keycode, and if so, how?
|
Partial answer:
according to the manufacturer, the keyboard is intended to be used on Windows.
That probably means it has a Windows-specific driver to deal with the non-standard parts of this keyboard.
As this driver won't be available on Linux, you have the choice of either using it as it is, or reverse-engineering the differences, and then trying to adapt Linux to deal with those. The latter will require time and effort.
Google for Jelly Comb shows it's probably a wireless keyboard with an USB receiver (you didn't say, I have to guess).
Quick primer on how the keyboard stack works on Linux:
For USB devices, there's something called HID (human interface device) protocol, which is a standard on how to encode communication with devices like keyboards. Use lsusb to identify your keyboards USB endpoint or endpoints (some keyboards have several), use lsusb -v to find out if the support HID.
The kernel decodes the HID events (and you can inspect the HID descriptor that describes those events, search this stackexchange or the superuser stackexchange for answers with details). Then the kernel passes them on to the input layer.
Input layer devices show up as /dev/event/input*. Have a look at dmesg after boot to see which ones your keyboard gets. You can use evtest to inspect events coming from them.
From the input layer, X or Wayland interprets the events, and use their keyboard mapping to do something with it.
So do check key combinations that are not working both with evtest and xev to see where funny things happen.
Your KeymapNotify event means that something picked up a code that causes the keyboard mapping to change. That may be because of the keyboard mapping you are using, or something that's installed on your desktop.
Don't expect the Fn to work. This key is non-standard, and every laptop manufacturer or keyboard manufacturer have their own way of doing something with it.
| Jelly Comb keyboard on linux |
1,644,345,090,000 |
I have an us altgr-intl layout.
with this command :
>_xmodmap -e "keycode 113 = Left NoSymbol U21BC NoSymbol U21BC U21BC U21BC"
(Or just 6 combinations, I tried many things ...)
AltGr+← still act like ← alone and
AltGr+Shift+← still act like Shift+←
Mode_shift+← works well.
I have some Fn's functions related to my arrows.
If I assign the formula above to a key without Fn's functions, it will work.
Is it a problem solvable at software level?
|
You cannot extend extend behavior of any key to use AltGr :
Each key have a type, and those one are ONE_LEVEL.
The solution is to mess with xkb.
$ xkbcomp $DISPLAY output.dump
will dump your full keymap.
We see here :
key <LEFT> { [ Left ] };
We can modify it as :
Key <LEFT> {
type[group1]= "FOUR_LEVEL",
type[group2]= "TWO_LEVEL",
symbols[group1]= [ Left, Left, Right, Down],
symbols[group2]= [ Prior, End ] };
There is two type handled by two group :
'FOUR_LEVEL' is here Base, Shift, AltGr, AltGr+shift
'TWO_LEVEL' is here Mode_switch, Mode_switch+Shift
Then test the map :
$ xkbcomp output.dump $DISPLAY
Everything works ...
almost ... well,
my Virtual Machines grabs now the default layout instead of mine and,
And I always have a strange behavior with some combinations of Fn's key
(I have two of them and one don't accept some modifiers).
| xmodmap not working with AltGr and arrow keys |
1,644,345,090,000 |
I'am trying to get the brightness control keys (fn + arrows) to work on Arch Linux x64.
So, i get a look into udev rule for my integrated ps/2 laptop keyboard using udevadm info:
P: /devices/platform/i8042/serio0/input/input4/event4
N: input/event4
L: 0
S: input/by-path/platform-i8042-serio-0-event-kbd
E: DEVPATH=/devices/platform/i8042/serio0/input/input4/event4
E: DEVNAME=/dev/input/event4
E: MAJOR=13
E: MINOR=68
E: SUBSYSTEM=input
E: USEC_INITIALIZED=26133209
E: KEYBOARD_KEY_74=prog1
E: KEYBOARD_KEY_75=www
E: KEYBOARD_KEY_78=mail
E: KEYBOARD_KEY_82=!switchvideomode
E: KEYBOARD_KEY_83=!battery
E: KEYBOARD_KEY_84=!prog1
E: KEYBOARD_KEY_86=!wlan
E: KEYBOARD_KEY_88=!brightnessup
E: KEYBOARD_KEY_89=!brightnessdown
E: KEYBOARD_KEY_b1=!prog2
E: KEYBOARD_KEY_b3=!prog3
E: KEYBOARD_KEY_b4=!wlan
E: KEYBOARD_KEY_c5=!prog3
E: KEYBOARD_KEY_d5=!wlan
E: KEYBOARD_KEY_f7=!f22
E: KEYBOARD_KEY_f9=!f23
E: ID_INPUT=1
E: ID_INPUT_KEY=1
E: ID_INPUT_KEYBOARD=1
E: ID_BUS=i8042
E: ID_SERIAL=noserial
E: ID_PATH=platform-i8042-serio-0
E: ID_PATH_TAG=platform-i8042-serio-0
E: LIBINPUT_DEVICE_GROUP=11/1/1:isa0060/serio0
E: DEVLINKS=/dev/input/by-path/platform-i8042-serio-0-event-kbd
E: TAGS=:power-switch:
The https://wiki.archlinux.org/index.php/Map_scancodes_to_keycodes says that syntax construction KEYBOARD_KEY_<scancode>=<keycode> binds the keycode to scancode. List of available keycodes can be found here.
As we can see, 88 and 89 scancodes are binded (or not?) to brightness keycodes. This is absolutely correct - i trying to press brightness keys while running evtest - and this generates 88 and 89 scancodes (but keycode information is missing). Pressing this keys while running journactl -f prints next: atkbd serio0: Unknown key pressed (translated set 2, code 0x88 on isa0060/serio0).
So, the problem is, that i just don't understand, that does the "!" symbol mean before keycode? I can't find this syntax case in udev docs.
I guess that this construction unbinds the key from scancode - then I'm at a loss: why would the developer who wrote this rule unbinds this absolutelly correct keys?
|
From /lib/udev/hwdb.d/60-keyboard.hwdb
# An '!' as the first character of the key identifier string
# will add the scan code to the AT keyboard's list of scan codes
# where the driver will synthesize a release event and not expect
# it to be generated by the hardware.
There doesn't seem to be other "documentation" beyond that in the systemd source code. hwdb(7) doesn't say anything about it.
| What does the exclamation mark mean in udev rule? |
1,644,345,090,000 |
In the keymaps manpage, section ABBREVIATIONS :
strings as usual
Defines the usual values of the strings (but not the keys they are bound to).
In which file are these usual definitions ?
|
As said in the mentioned man
It has to be ... figured out from the kernel sources.
So, these usual definitions are in src/libkeymap/parser.y of the Linux keyboard tools (KBD) source.
| keymaps : strings as usual |
1,644,345,090,000 |
Can zsh detect a key status without a tool that depends on a graphical session?
I've overwritten the getty@tty1 service to autologin, and zlogin executes sway. I would like to prevent running a graphical interface when the shift key is held down by unsetting rcs. Is there Something similar to grub's keystatus?
|
Terminals don't transmit this information. You need to call an external utility (or write a zsh loadable module) that is specific to the Linux console. It would need to call one of the Linux console ioctl, specifically TIOCLINUX to obtain the shift state. Keyboard-related utilities are in the kbd package, but I don't think there is one that reports modifier states.
You can find the code for such a utility at a similar question on Stack Overflow.
If you don't want to rely on an additional utility, the kbd package includes kbdinfo which can report the LED state.
# Start X if Caps Lock is on
if kbdinfo gkbled capslock; then
setleds -D -caps
exec startx
fi
| Detect key status in zsh from the Linux console |
1,644,345,090,000 |
The keyboard and mouse problem
I am running a laptop with touchpad and keyboard integrated, and I have previously had an issue where my touchpad would make my mouse go in a grid-like pattern. Upon investigating solutions to this issue, I managed to do something incredibly stupid. I removed a package that supposedly controlled my input, and now I can't log in or do anything but hold the power button down when I log into normal mode. Recovery mode works well, but Re-installing packages in recovery seem to not reflect in normal mode.
On the laptop (Lenovo Yoga 710) I have Deepin linux 15.5 installed.
All I know and I can recall I did before I chose to restart it, was that i was uninstalling a package starting at: xorg-xserver-input-*but can't really specify the exact package I removed.
As I stated above, I think that my recovery mode doesn't reflect package changes on normal mode (i could be wrong), as I can't get my mouse or keyboard working at all when I then re-log into normal mode. I have tried reinstalling xorg-xserver-input-all and even tried with wildcards. Am I missing some configuration?
It's critical for me to get it working until monday, and I guess I am the reason why I made it this way. Has anyone a clue where I could start to get my mouse and keyboard working again? I tried external devices over USB ad bluetooth but none of the input devices are recognised.
|
Have you got a second machine on the network you can SSH from?
If so, you can ssh in, and manually install libinput as per this documentation:
https://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html
If ssh is not an option, then I would suggest booting a recovery CD/USB, mount your deepin main partition and compile libinput there as per the documentation above.
| Managed to uninstall package for keyboard and mouse input. (libinput?) |
1,644,345,090,000 |
My Logitech Wave Cordless keyboard presents itself as two devices to the kernel. One is a regular keyboard which works fine, but all the additional keys appear as an event-mouse, such that
cat /dev/input/by-id/usb-Logitech_USB_Receiver-if01-event-mouse
produces the expected garbage when the buttons are pressed, but xev doesn't register anything at all.
I've tried hidpoint which doesn't want to run on OpenSuse Tumbleweed, and I've tried
usbhid.quirks=0x46d:0xc517:0x40
on the kernel parameters to force 'multi-identity' recognition, but I'm out of my depth at this point so may well not properly understand what I'm doing
Any suggestions about how best to persuade the kernel to recognise the extra device as a keyboard rather than a mouse?
Further info as requested:
lsusb:
Bus 001 Device 007: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
dmsg:
usb 1-6: new low-speed USB device number 7 using xhci_hcd
usb 1-6: New USB device found, idVendor=046d, idProduct=c517
usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-6: Product: USB Receiver
usb 1-6: Manufacturer: Logitech
input: Logitech USB Receiver as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:046D:C517.0009/input/input14
logitech 0003:046D:C517.0009: input,hidraw3: USB HID v1.10 Keyboard [Logitech USB Receiver] on usb-0000:00:14.0-6/input0
logitech 0003:046D:C517.000A: fixing up Logitech keyboard report descriptor
input: Logitech USB Receiver as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.1/0003:046D:C517.000A/input/input15
logitech 0003:046D:C517.000A: input,hiddev0,hidraw4: USB HID v1.10 Mouse [Logitech USB Receiver] on usb-0000:00:14.0-6/input1
$ evtest /dev/input/by-id/usb-Logitech_USB_Receiver-if01-event-mouse > evtestdump
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x46d product 0xc517 version 0x110
Input device name: "Logitech USB Receiver"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 1 (KEY_ESC)
Event code 28 (KEY_ENTER)
Event code 74 (KEY_KPMINUS)
Event code 78 (KEY_KPPLUS)
Event code 103 (KEY_UP)
...
Event code 241 (KEY_VIDEO_NEXT)
Event code 244 (KEY_BRIGHTNESS_ZERO)
Event code 256 (BTN_0)
Event code 272 (BTN_LEFT)
Event code 273 (BTN_RIGHT)
Event code 274 (BTN_MIDDLE)
Event code 275 (BTN_SIDE)
Event code 276 (BTN_EXTRA)
Event code 277 (BTN_FORWARD)
Event code 278 (BTN_BACK)
Event code 279 (BTN_TASK)
Event code 352 (KEY_OK)
Event code 353 (KEY_SELECT)
Event code 354 (KEY_GOTO)
Event code 358 (KEY_INFO)
Event code 362 (KEY_PROGRAM)
Event code 366 (KEY_PVR)
Event code 370 (KEY_SUBTITLE)
Event code 371 (KEY_ANGLE)
Event code 372 (KEY_ZOOM)
Event code 374 (KEY_KEYBOARD)
Event code 376 (KEY_PC)
Event code 377 (KEY_TV)
Event code 378 (KEY_TV2)
...
Event code 431 (KEY_DISPLAYTOGGLE)
Event code 432 (KEY_SPELLCHECK)
Event code 433 (KEY_LOGOFF)
Event code 439 (KEY_MEDIA_REPEAT)
Event code 442 (KEY_IMAGES)
Event code 478 (KEY_FN_1)
Event code 479 (KEY_FN_2)
Event code 576 (KEY_BUTTONCONFIG)
Event code 577 (KEY_TASKMANAGER)
Event code 578 (KEY_JOURNAL)
Event code 579 (KEY_CONTROLPANEL)
Event code 580 (KEY_APPSELECT)
Event code 581 (KEY_SCREENSAVER)
Event code 582 (KEY_VOICECOMMAND)
Event code 592 (KEY_BRIGHTNESS_MIN)
Event code 593 (KEY_BRIGHTNESS_MAX)
Event code 608 (KEY_KBDINPUTASSIST_PREV)
Event code 609 (KEY_KBDINPUTASSIST_NEXT)
Event code 610 (KEY_KBDINPUTASSIST_PREVGROUP)
Event code 611 (KEY_KBDINPUTASSIST_NEXTGROUP)
Event code 612 (KEY_KBDINPUTASSIST_ACCEPT)
Event code 613 (KEY_KBDINPUTASSIST_CANCEL)
Event type 2 (EV_REL)
Event code 0 (REL_X)
Event code 1 (REL_Y)
Event code 6 (REL_HWHEEL)
Event code 7 (REL_DIAL)
Event code 8 (REL_WHEEL)
Event type 3 (EV_ABS)
Event code 32 (ABS_VOLUME)
Value 0
Min 1
Max 4173
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)
Event: time 1498324926.500910, type 4 (EV_MSC), code 4 (MSC_SCAN), value c101c
Event: time 1498324926.500910, type 1 (EV_KEY), code 154 (KEY_CYCLEWINDOWS), value 1
Event: time 1498324926.500910, -------------- SYN_REPORT ------------
Event: time 1498324926.644944, type 4 (EV_MSC), code 4 (MSC_SCAN), value c101c
Event: time 1498324926.644944, type 1 (EV_KEY), code 154 (KEY_CYCLEWINDOWS), value 0
Event: time 1498324926.644944, -------------- SYN_REPORT ------------
Event: time 1498324926.932933, type 4 (EV_MSC), code 4 (MSC_SCAN), value c101f
Event: time 1498324926.932933, type 1 (EV_KEY), code 419 (KEY_ZOOMOUT), value 1
Event: time 1498324926.932933, -------------- SYN_REPORT ------------
Event: time 1498324927.052921, type 4 (EV_MSC), code 4 (MSC_SCAN), value c101f
Event: time 1498324927.052921, type 1 (EV_KEY), code 419 (KEY_ZOOMOUT), value 0
Event: time 1498324927.052921, -------------- SYN_REPORT ------------
Event: time 1498324927.396932, type 4 (EV_MSC), code 4 (MSC_SCAN), value c1020
Event: time 1498324927.396932, type 1 (EV_KEY), code 418 (KEY_ZOOMIN), value 1
Event: time 1498324927.396932, -------------- SYN_REPORT ------------
Event: time 1498324927.548930, type 4 (EV_MSC), code 4 (MSC_SCAN), value c1020
Event: time 1498324927.548930, type 1 (EV_KEY), code 418 (KEY_ZOOMIN), value 0
Event: time 1498324927.548930, -------------- SYN_REPORT ------------
Event: time 1498324927.916944, type 4 (EV_MSC), code 4 (MSC_SCAN), value c103d
Event: time 1498324927.916944, type 1 (EV_KEY), code 240 (KEY_UNKNOWN), value 1
Event: time 1498324927.916944, -------------- SYN_REPORT ------------
Event: time 1498324928.084925, type 4 (EV_MSC), code 4 (MSC_SCAN), value c103d
Event: time 1498324928.084925, type 1 (EV_KEY), code 240 (KEY_UNKNOWN), value 0
Event: time 1498324928.084925, -------------- SYN_REPORT ------------
Event: time 1498324928.460914, type 4 (EV_MSC), code 4 (MSC_SCAN), value c1005
Event: time 1498324928.460914, type 1 (EV_KEY), code 212 (KEY_CAMERA), value 1
Event: time 1498324928.460914, -------------- SYN_REPORT ------------
Event: time 1498324928.628903, type 4 (EV_MSC), code 4 (MSC_SCAN), value c1005
Event: time 1498324928.628903, type 1 (EV_KEY), code 212 (KEY_CAMERA), value 0
Event: time 1498324928.628903, -------------- SYN_REPORT ------------
Event: time 1498324930.876924, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00b6
Event: time 1498324930.876924, type 1 (EV_KEY), code 165 (KEY_PREVIOUSSONG), value 1
Event: time 1498324930.876924, -------------- SYN_REPORT ------------
Event: time 1498324930.908915, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00b6
Event: time 1498324930.908915, type 1 (EV_KEY), code 165 (KEY_PREVIOUSSONG), value 0
Event: time 1498324930.908915, -------------- SYN_REPORT ------------
Event: time 1498324931.684927, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00b5
Event: time 1498324931.684927, type 1 (EV_KEY), code 163 (KEY_NEXTSONG), value 1
Event: time 1498324931.684927, -------------- SYN_REPORT ------------
Event: time 1498324931.724935, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00b5
Event: time 1498324931.724935, type 1 (EV_KEY), code 163 (KEY_NEXTSONG), value 0
Event: time 1498324931.724935, -------------- SYN_REPORT ------------
Event: time 1498324932.652916, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0183
Event: time 1498324932.652916, type 1 (EV_KEY), code 226 (KEY_MEDIA), value 1
Event: time 1498324932.652916, -------------- SYN_REPORT ------------
Event: time 1498324932.812954, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0183
Event: time 1498324932.812954, type 1 (EV_KEY), code 226 (KEY_MEDIA), value 0
Event: time 1498324932.812954, -------------- SYN_REPORT ------------
Event: time 1498324933.748907, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0192
Event: time 1498324933.748907, type 1 (EV_KEY), code 140 (KEY_CALC), value 1
Event: time 1498324933.748907, -------------- SYN_REPORT ------------
Event: time 1498324933.884934, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0192
Event: time 1498324933.884934, type 1 (EV_KEY), code 140 (KEY_CALC), value 0
Event: time 1498324933.884934, -------------- SYN_REPORT ------------
Event: time 1498324938.084936, type 4 (EV_MSC), code 4 (MSC_SCAN), value 10082
Event: time 1498324938.084936, type 1 (EV_KEY), code 142 (KEY_SLEEP), value 1
Event: time 1498324938.084936, -------------- SYN_REPORT ------------
Event: time 1498324938.100912, type 4 (EV_MSC), code 4 (MSC_SCAN), value 10082
Event: time 1498324938.100912, type 1 (EV_KEY), code 142 (KEY_SLEEP), value 0
Event: time 1498324938.100912, -------------- SYN_REPORT ------------
(II) config/udev: Adding input device Logitech USB Receiver (/dev/input/mouse1)
(**) Logitech USB Receiver: Applying InputClass "system-keyboard"
(**) Logitech USB Receiver: Applying InputClass "Logitech USB TrackBall"
(**) Logitech USB Receiver: Applying InputClass "Logitech M570 Trackball"
(II) Using input driver 'evdev' for 'Logitech USB Receiver'
(**) Option "SendCoreEvents" "true"
(**) Logitech USB Receiver: always reports core events
(**) evdev: Logitech USB Receiver: Device: "/dev/input/by-id/usb-Logitech_USB_Receiver-if02-event-mouse"
(WW) evdev: Logitech USB Receiver: device file is duplicate. Ignoring.
(EE) PreInit returned 8 for "Logitech USB Receiver"
(II) UnloadModule: "evdev"
(II) config/udev: Adding input device Logitech USB Receiver (/dev/input/event11)
(**) Logitech USB Receiver: Applying InputClass "evdev keyboard catchall"
(**) Logitech USB Receiver: Applying InputClass "system-keyboard"
(**) Logitech USB Receiver: Applying InputClass "evdev keyboard catchall"
(**) Logitech USB Receiver: Applying InputClass "libinput keyboard catchall"
(II) Using input driver 'libinput' for 'Logitech USB Receiver'
(**) Logitech USB Receiver: always reports core events
(**) Option "Device" "/dev/input/event11"
(**) Option "_source" "server/udev"
(II) event11 - (II) Logitech USB Receiver: (II) is tagged by udev as: Keyboard
(II) event11 - (II) Logitech USB Receiver: (II) device is a keyboard
(II) event11 - (II) Logitech USB Receiver: (II) device removed
(**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:046D:C517.000D/input/input18/event11"
(II) XINPUT: Adding extended input device "Logitech USB Receiver" (type: KEYBOARD, id 11)
(**) Option "xkb_model" "microsoftpro"
(**) Option "xkb_layout" "gb"
(**) Option "xkb_options" "terminate:ctrl_alt_bksp"
(II) event11 - (II) Logitech USB Receiver: (II) is tagged by udev as: Keyboard
(II) event11 - (II) Logitech USB Receiver: (II) device is a keyboard
(II) config/udev: Adding input device Logitech USB Receiver (/dev/input/event12)
(**) Logitech USB Receiver: Applying InputClass "evdev pointer catchall"
(**) Logitech USB Receiver: Applying InputClass "evdev keyboard catchall"
(**) Logitech USB Receiver: Applying InputClass "system-keyboard"
(**) Logitech USB Receiver: Applying InputClass "evdev pointer catchall"
(**) Logitech USB Receiver: Applying InputClass "evdev keyboard catchall"
(**) Logitech USB Receiver: Applying InputClass "Logitech USB TrackBall"
(**) Logitech USB Receiver: Applying InputClass "Logitech M570 Trackball"
(**) Logitech USB Receiver: Applying InputClass "libinput pointer catchall"
(**) Logitech USB Receiver: Applying InputClass "libinput keyboard catchall"
(II) Using input driver 'libinput' for 'Logitech USB Receiver'
(**) Option "SendCoreEvents" "true"
(**) Logitech USB Receiver: always reports core events
(**) Option "Device" "/dev/input/by-id/usb-Logitech_USB_Receiver-if02-event-mouse"
(**) Option "_source" "server/udev"
(EE) Failed to look up path '/dev/input/event13'
(II) event13: opening input device '/dev/input/event13' failed (No such device).
(II) event13 - failed to create input device '/dev/input/event13'.
(EE) libinput: Logitech USB Receiver: Failed to create a device for /dev/input/by-id/usb-Logitech_USB_Receiver-if02-event-mouse
(EE) PreInit returned 2 for "Logitech USB Receiver"
(II) UnloadModule: "libinput"
I do have an M570 trackball as well that the receiver is obviously connecting to although it is already linked via a universal receiver.
|
Partial answer: How to get more information
1) Update question with out of lsusb so we can see the vendor and device id.
2) Update question with dmesg output when the combo is recognized. Unplug and replug the dongle to force re-recognition if you can't find it in the boot messages.
3) Run evtest as root on the mouse input device to see (a) what events it claims to produce (b) what actual events it produces when you press the additional keys. Update question with that output.
4) Look into /var/log/Xorg.0.log to see as what device the evdev driver it recognizes. Update question with relevant lines.
That should allow at least to pinpoint the reason why the device gets recognized as mouse.
Edit
I don't understand how the Logitech driver is supposed to work, but what happens is that the second device seems indeed to be reserved for extra keys and for the mouse (EV_REL) events, so maybe it's some kind of catchall thing.
From the kernel side that makes no difference, all the kernel knows is that it translates USB HID events to input events. And udev does symlinks with misleading names, but that doesn't matter, either. What matters is that X seems to decide that the second input device is duplicate (maybe because it has the same name). So I'd try to make an xorg.conf with an InputClass section in it, and play around with various options in the hope to get X to accept the device. I'm not sure why X rejects it, so I can't give step-by-step instructions. See man xorg.conf about options for InputClass, and google a bit to understand what they do if the description is not sufficient, there's plenty of guides.
Besides checking the X log, also have a look at what devices xinput lists. It's enough to make it show up in this list, even if it shows up as mouse - you can reassign it to the Virtual core keyboard. And it will probably get detected as mouse, because X thinks (probably correctly in most cases) that something with EV_REL events must be as mouse, even if it has additional EV_KEY buttons.
| My keyboard identifies as a mouse |
1,644,345,090,000 |
I've just installed KDE Plasma using Antergos, and I am quite annoyed at the default behavior of the alt-keys, since pressing altGr-2 does not type out the at key, but rather the same command as alt-2. Is there any way to revert this behaviour?
|
It sounds like your keyboard model, layout, or options isn't set correctly. In KDE, there is a "Keyboard" settings panel where you can change it. Easiest way to pull it up is to open the KDE menu or the quick-runner, and start typing "Keyboard".
You can also get to it under KDE Menu→Computer→System Settings→Input Devices.
It looks like this:
.
Many of these can also be set system-wide. E.g., on Debian it'd be sudo dpkg-reconfigure keyboard-configuration but I'm not sure about Antergos.
| Use Alt-letter symbols on KDE |
1,644,345,090,000 |
I am running windows 8.1 on my lenovo laptop. Of late, several keys on my laptop are not functioning properly. Some keys are getting stuck repeatedly, and some don't get registered at all.
I don't have linux installed. What I want to do is to see if my keyboard works properly on Linux. What's the easiest and most time efficient way to go about testing it?
|
As suggested by @dirkt this was indeed a hardware problem. I had to eventually get the keyboard replaced.
| Laptop keys not functioning |
1,644,345,090,000 |
Here's my system info from uname -a:
Linux fu457 4.6.0-kali1-amd64 #1 SMP Debian 4.6.4-1kali1 (2016-07-21) x86_64 GNU/Linux
GNOME Shell 3.21.91
Now, when I go to 'Settings' and click on 'Keyboard' to add a custom shortcut key, the 'Keyboard' setting window will not open. It will flash a second or two in the taskbar (topbar) and exit immediately.
|
It seems the current work around for this is to upgrade to libgtk-3.0 from debian unstable. According to the bug tracker this should be added to the repos on 9/16. Although I just did a dist-upgrade and the problem still persists.
Here is the bug tracker https://bugs.kali.org/view.php?id=3579
| How to fix the "keyboard setting" not opening |
1,644,345,090,000 |
I am in the process of getting rid of udev daemon from my system. I have fixed all issues, only one small problem is remaining:
It used to be (when I was using udev), that Fn+Down acted as XF86MonBrightnessDown and Fn+UP acted as XF86MonBrightnessUp, so that I could create a keybinding in Openbox for xbacklight -dec 5 and xbacklight -inc 5 respectively to change display brightness.
When I boot my laptop without udev, these keys no longer work. Other Fn keys such as Fn+Pause or Fn+SysRq work fine.
Looking with xev, I see following when I press Fn+Down,
KeyPress event, serial 46, synthetic NO, window 0x2600001,
root 0xb9, subw 0x0, time 952589, (169,-10), root:(1040,435),
state 0x10, keycode 101 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 46, synthetic NO, window 0x2600001,
root 0xb9, subw 0x0, time 952589, (169,-10), root:(1040,435),
state 0x10, keycode 101 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
How can I make my Fn keys work again ?
I am using LXDE (Openbox) on Debian.
UPDATE
I have discovered a file /lib/udev/keymaps/dell which apparently idev uses to set up the keymap. It contains, among other lines:
0x85 brightnessdown # Fn+Down arrow Brightness Down
0x86 brightnessup # Fn+Up arrow Brightness Up
so how can I map this file manually, without udev?
What command do I need to use?
|
Maybe I overlook something, but isn't this just a matter of adding the XF86MonBrightnessDown and XF86MonBrightnessUp to your xmodmap?
xmodmap -e "keycode 101 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown" for testing this temporarily. Similar for brightness up.
If it works, you need to make this permanent depending on your display manager. LXDE has LXDM, so make your changes according to here (xmodmap handling starts at line 39) after you modify a keymap generated with xmodmap -pke > ~/.Xmodmap permanently as tested with the xmodmap modification above.
| Fn keyboard keys not working (when udev is disabled) |
1,644,345,090,000 |
In my Ubuntu Server 14 with FluxBox i use to bind actions on Eterm.
This is my user.cfg file:
[...]
begin actions
bind ctrl shift button3 to string '^[]6;14^G'
bind ctrl button3 to menu "Eterm"
bind ctrl button2 to string '^[[?30t'
bind ctrl button1 to string '^[]5;^G'
# mine actions start here
bind End to echo '^E'
bind F1 to echo '^[OP'
bind F2 to echo '^[OQ'
bind F3 to echo '^[OR'
bind F4 to echo '^[OS'
bind F5 to echo '^[5'
bind F6 to echo '^[6'
bind F10 to echo '99^Msigi^M'
end actions
[...]
as you can see I bind the End and the F buttons to some specific command.
I need this commands on a telnet sessions.
This work well, but if I activate the Caps Lock none of previous actions work (even the Eterm native actions).
I can't figure out why this happen, someone can?
A Solution
A solution that works for me, as sudgested by @Thomas Dickey, is to use the modifier Lock, So, this action:
begin actions
[...]
bind End to echo '^E'
[...]
end actions
become this
begin actions
[...]
bind End to echo '^E'
bind Lock End to echo '^E'
[...]
end actions
And now the End button works well even with the CapsLock active
|
CapsLock is (almost) the same as holding down the shift-key.
Eterm (actually rxvt, since that's where Eterm started) treats the shift- and control-modifiers for function (and cursor) keys as different values.
Here are pointers to a few tables to illustrate:
Rxvt Technical Reference (see table near the end)
rxvt in ncurses terminal database
Eterm in ncurses terminal database
Table of function-keys for XTerm and other Terminal
Emulators (a digression from the XTerm FAQ)
Terminal Function Key Escape Codes (some of the commentary on the page is inaccurate).
| CapsLock breaks Eterm keybinds |
1,644,345,090,000 |
I've got brand new gentoo on my box. No X installed. I want to know correct way to setup changing keyboard layout while in text mode. (Basically I need a simple way of cycling between three keyboard layouts)
|
you have to edit /etc/conf.d/keymap file
for ex:
Spanish key board
KEYMAP="es"
US keyboard
KEYMAP="us"
Edit :
You can setup alias to quickly switch from one keyboard layout to another.
You have to edit .bashrc or .bash_profile (located in your home directory)
~/.bashrc aka $HOME/.bashrc aka /home/$USER/.bashrc
alias kbd1="loadkeys /usr/lib/kbd/keytables/dvorak.map"
alias kbd2="loadkeys /usr/lib/kbd/keytables/us.map"
or
alias kbd1="sudo loadkeys qwerty"
alias kbd2="sudo loadkeys dvorak"
I haven't setup the hot keys as the way you are looking for. But, I can give you a reference. Check this page ==> Hot key setup on console
You should be careful while setting up hotkeys as they should not affect the existing keys used by other drivers like tty.
for ex: these keys reserved by the consoles
Ctrl + C : Cancels current running command
Ctrl + D : Logs out of the current session
Ctrl + S : Stops all output on screen (XOFF)
Ctrl + W : Deletes the last word typed
Ctrl + U : Erases the complete line.
Ctrl + Q : Turns all output stopped on screen back on (XON)
Ctrl + F : Moves the cursor forward one character
Ctrl + P : Paste previous line(s)
Ctrl + B : Moves the cursor backward one character
Ctrl + H : Erase one character. Similar to pressing backspace
Ctrl + Z : Cancels current operation, moves back a directory or takes the current operation and moves it to the background
| Change keyboard layout by shortcut (text mode only) |
1,644,345,090,000 |
I suspend to ram. Sometimes when I resume, some of the keys do not work. Some keys are reacting, but ALT-TAB for one is not.
What can I do to ask the auto detection to retry configuring keyboard?
|
Switch to a console (CTRL-ALT-F1) and switch back (CTRL-ALT-F8) solves it.
| Keyboard misconfigured after resume from suspend-to-ram |
1,644,345,090,000 |
My ctrl and right-shift keys are not responding, though they still work in a VMware window. Numlock doesn't work. A held-down key does not repeat. clicking in a field in another window does not make that window active.
Can I clear whatever's making it sick without rebooting?
It started (approximately?) when my full-screen VMWare workstation instance on Desktop 2 was missing and found as a small window on Desktop 4. It moved by itself or I accidentally entered a strange command while working on Desktop 1?
Linux Mint 17.1 Rebeca, standard Cinnamon desktop.
|
I found the answer on this blog post.
First
egrep -i 'rules|layout|model' /var/log/Xorg.0.log
to note the values of interest, and then (in my case)
setxkbmap -rules evdev -layout us -model pc105
to restore them. If the keyboard/X-console is too hosed to use at all, the original poster used SSH from another machine and prepended DISPLAY=:0 (Though I'm not sure where that goes). Another commenter plugged in another USB keyboard temporarily.
The blog poster indicates that VMWare is to blame, which makes sense since that's what I'm using too. Another commenter noted that he has the problem with VNC.
I put this line in an executable file on the desktop, for future need. I'm assuming that the values don't change unless my hardware changes.
| My shift/ctrl and numlock keys stopped working |
1,644,345,090,000 |
so I booted up an old Linux Mint machine today and I can't seem to remember the password. So I wanted to reset the password using the instructions on Mint's website but when I hold shift the GNU GRUB boot menu does not seem to come up. It just asks me for my password then shows me the login screen.
To clarify, I know the system password but not the login password.
I initially assumed it was because I was using a USB keyboard at first but that does not appear to be the problem as it is recognizing the keyboard immediately and I can enter Bios.
Any help would be appreciated.
Password Reset Page - http://community.linuxmint.com/tutorial/view/339
|
You have to download in other machine a live distro (if you have 64bit , download 64 and if you have 32bit download 32 bit), Then step by step do the following steps:
Boot with your live cd
create a dir
mount your old linux on your dir
chroot dir
Now , you have old linux and you can change password, and manipulate grub and run grub-install
| Can't enter GNU GRUB boot menu! |
1,644,345,090,000 |
Some application on my system (Ubuntu Linux 13.0) is hijacking a specific keyboard shortcut (Ctrl+Space). I don't know which one it is and would like to identify it.
How can I do this?
|
ibus is known to do this (at least on 14.04)
see https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/1278569
| Is there any way to identify which application is hijacking a keyboard shortcut? |
1,644,345,090,000 |
I have a raspberry pi running some software (I have the source) that needs user interaction and has a special (USB) keyboard with only 3 keys.
The program runs on framebuffer (SDL) and is launched remotely; I need this program to react to the key presses, but seems impossible if the user is not logged in locally.
What can I do? The solution must not use a lot of resources, and the delay should be within 300ms.
Typical use case is one key press every 10 minutes over the course of 4-8 hours, but can be as often as a key press every 2 seconds (highly unlikely). This all runs on top of raspbian, I have root access .
|
I solved this by reading the raw input device and parsing it similarly to https://stackoverflow.com/a/2554421/3530257
| Use/Grab the only keyboard with no user logged locally |
1,644,345,090,000 |
I'm Brazilian and new with Linux. I have the CentOS 6.5 with Gnome 2.28.2 running in a VirtualBox VM. I'm using it to PHP programming and I'm loving it. But I'm having a hard time to make accentuation.
I have a standard US International Keyboard (NOT an ABNT2 - no "cedil" key). In Windows, I choose the Brazilian Portuguese language and United States International Keyboard layout, and everything works fine. When I want to make a cedil, I just type the accent key ('), and then the C key. The same process to make accented chars, like A with tilde (~ then A).
I already tryied to search the Internet, without success... Every howto points me to ABNT2 keyboards (witch is the standard Brazilian Keyboard), but my Keyboard is the US-Intl.
|
I face-off a similar problem, I am using CENTOS 7, with US Keyboard Layout, but any dead key (a.k.a. tildes, ñ, etc) didn't work, because there was no way to install or setup a US International Keyboard layout.
At google, I found this suggestion:
yum install system-config-keyboard
after that, I had available the system-config-keyboard and let me change the keyboard to US International.
btw, all these with root.
Regards
VieL
| Brazilian Keyboard layout in CentOS 6.5 |
1,644,345,090,000 |
Is it possible to define bash scripts for all keys on keyboard so that by pressing any key the bash script for that key will be run?
The scripts may do anything, for instance they may save the key code in an (undo list) file, or any thing else.
In KDE, if a key can be set as a (Qt) hotkey there's a simple solution for it, but for example A cannot be a hotkey and it seems impossible to urge it to run any scripts.
|
Mapping keys to run commands
You can create shortcut key combinations that will launch commands, I've successfully been using XBindKeys on GNOME 3.8.4 for this very purpose.
My use has been modest but I like to create keyboard shortcuts for Nautilus to launch with certain directories opened.
Example
You'll need to first make sure the packages xbindkeys is installed.
Then you'll need to run the following command, one time only, to create a template xbindkeys configuration file.
$ xbindkeys --defaults > /home/saml/.xbindkeysrc
With the file created you can open it in a text editor and add a rule like this:
"nautilus --browser /home/saml/projects/path/to/some/dir"
Mod4+shift + q
With the above change made we need to kill xbindkeys if it's already running and then restart it.
$ killall xbindkeys
$ xbindkeys
Now with this running any time I type Mod+Shift+Q Nautilus will open with the corresponding folder opened.
References
XBindKeys
| Forcing keys to run bash scripts |
1,368,727,644,000 |
I'm connecting to a Solaris box from Mac OS X. Whenever I have connected to linux boxes in the past it has been much easier to navigate around. How do I fix these configuration issues on Solaris?
Have to use control+h instead of backspace key
When in man the escape key does not quit the man page - how do I exit?
I didn't see a .bash_profile or .profile in the home directory, how do I set up things like alias ll="ls -al" on the remote machine?
|
A Solaris machine has ksh as the default shell, I believe. Ksh doesn't have the sophisticated interactive feature you may be used to if you've used bash or zsh before. If you want a comfortable environment, install zsh or at least bash on the Solaris machine. If bash or zsh is already installed by the system administrator, use chsh to switch to it. If you install it yourself, you won't be allowed to use chsh, but instead you can switch shells inside your .profile (make this the last thing):
case $- in *i*)
## This is an interactive shell, try to switch over to a better shell
if whence zsh >/dev/null 2>/dev/null; then exec zsh -i; fi
if whence bash >/dev/null 2>/dev/null; then exec bash -i; fi
;;
esac
If you decide to stick with ksh, its configuration file is ~/.kshrc, that's where you would define aliases. (Note that aliases are for each shell instance, not for a session, so they don't belong in ~/.profile).
The Backspace key should work out of the box if everybody left things well alone. Unfortunately, many OSes ship with settings that make double sure everything works as long as you're using the same OS everywhere, but break the automation that would otherwise make things work across remote logins. I don't know which of Solaris or OSX is the culprit. If you don't feel like investigating, you can tell the Solaris shell that the “DEL character” deletes to the left with this command in your ~/.profile (this will do the wrong thing if you log in from a machine where BackSpace sends ^H).
stty erase '^?'
The Escape key doesn't normally quit any text mode application. The usual man page viewer is less, and its quit command is bound to q.
| How do I set Keyboard and profile preferences when connecting to Solaris via SSH? |
1,368,727,644,000 |
I know how to set Super_L (WinKey) button
to open the Menu.
gconftool-2 --set /apps/metacity/global_keybindings/panel_main_menu --type string "Super_L"
Currently, in order to close that menu, I am having to mouse click outside the menu area. I need to use the Super_L as a toggle button—pressing one time would open and pressing second time would close.
So what I need now is to be able to close it when pressing it second time?
|
(Edit) After having re-read the post and doing a bit more research into the subject, I found out my suggestion is a bit... stupid. But, I'll leave it here in case anyone finds inspiration from it in a similar venture.
Try writing as small script called toggle.sh, put it somewhere.
if `panel_is_open`
close_panel
else
open_panel
or
if [ `cat panel` == "on" ]; then
close_panel
echo 'off' > panel
else
open_panel
echo 'on' > panel
fi
Something along those lines
Then after --set use /path/to/toggle.sh
| GNOME: Use WinKey (Super_L) as a main menu toggle |
1,368,727,644,000 |
Is there a way to bind TAB so that it outputs 2 space characters? I know you can do this in a text editor like Vim, but I wanted to carry over this functionality to cat >>.
|
Not at the xmodmap level. You could make a program grab the key and inject two spaces into the focused window. Or you could configure your terminal emulator to do the transformation. For example, in xterm, you'd do it with a resource setting:
XTerm.VT100.translations: #override \
~Ctrl ~Meta ~Shift <Key>Tab: string(" ")
However, I definitely recommend against this. You'd lose the ability to use Tab for anything else, such as completion in shells and other text mode programs.
| Is there a way to bind TAB so that it outputs 2 space characters? |
1,368,727,644,000 |
This is a weird one... I recently upgraded from Debian lenny to squeeze (following the upgrade instructions step by step). Everything went surprisingly well, except for one piece of strange new behavior I haven't encountered before. First, the left arrow key won't work at all (although right, up, and down do). Second, if I keep the left arrow key held down for a few seconds and then release it, I get trapped in Mode_switch mode. In other words, I have a .Xmodmap file with the following:
keycode 113 = Mode_switch
keycode 38 = a A aacute Aacute
keycode 26 = e E eacute Eacute
...
After I've held down the left arrow key for a few seconds, every a or e character I type is accented, and the only way I can revert this is to log out and log back in to my Gnome session.
I know something keyboard-related changed from lenny to squeeze, but I don't know how to troubleshoot something like this. Any ideas what's wrong?
|
After looking further, I found that the keycode set as Mode_switch actually didn't correspond to my Alt_R key as I intended (I changed keyboards a while ago, but didn't notice this until the upgrade). Setting the keycode to the correct key fixed the problem.
| Holding left arrow triggers permanent Mode_switch |
1,368,727,644,000 |
I use a Lenovo Thinkpad X1 (Gen 6) laptop. Currently, I'm on Fedora.
In the GRUB menu, the internal keyboard works as expected. While using the OS, the keyboard is mainly unresponsive, but sometimes gets enabled and directly after that disabled. This is what it looks like observed with libinput debug-events:
-event16 SWITCH_TOGGLE +13.842s switch tablet-mode state 0
-event15 SWITCH_TOGGLE +13.843s switch tablet-mode state 0
-event16 SWITCH_TOGGLE +13.892s switch tablet-mode state 1
-event15 SWITCH_TOGGLE +13.892s switch tablet-mode state 1
evtest shows what device those events are attached to:
/dev/input/event15: ThinkPad Extra Buttons
/dev/input/event16: Intel HID switches
libinput is on version 1.24.0.
This problem occurs (at least) with the following distros:
OpenSUSE Tumbleweed
Vanilla OS Orchid
Arch
Fedora
It would be best if I could make the tablet mode appear only when the laptop is "flipped", but completely disabling the tablet mode (or that the tablet mode disables the keyboard) is enough.
I tried to disable it with:
export LIBINPUT_IGNORE_DEVICE="17 20"
I also tried disabling both events at the same time with:
evtest --grab /dev/input/event15
evtest --grab /dev/input/event16
Although libinput debug-events stopped reporting the tablet mode switching, it still occurred.
|
I managed to solve this problem by blacklisting the Intel Integrated Sensor Hub.
Add the line blacklist intel_ish_ipc to the file /etc/modprobe.d/blacklist.conf.
Run dracut -f (on Fedora) or update-initramfs -u (Ubuntu).
Source: https://www.reddit.com/r/linuxquestions/comments/fzyvvy/disable_intel_integrated_sensor_hub_ish/
| Linux randomly enables and disables tablet mode on a Lenovo Thinkpad X1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.