Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [input]

The tag has no usage guidance.

1
vote
1answer
21 views

read -s gives error via script

I am trying to read a password from user, i used -s silent flag but read -s is not working from the script but it works if i do it manually from terminal. error details project.sh: 3: read: Illegal ...
1
vote
1answer
26 views

Why does a single Yubico show as multiple devices, what's the difference between hid-generic and input?

When I plug in my Yubikey it shows as, usb 1-1: new full-speed USB device number 46 using xhci_hcd usb 1-1: New USB device found, idVendor=1050, idProduct=0407, bcdDevice= 5.12 usb 1-1: New USB ...
0
votes
0answers
17 views

Natural Scrolling - Overview

What are the (software-side) solutions to get natural scrolling, explicitly inverting the scroll direction of the mouse wheel, to work. I know this has been asked several times, and there are several ...
5
votes
1answer
91 views

Why does gawk treat `0123` as a decimal number when coming from the input data?

According to $ man gawk, the strtonum() function can convert a string into a number: strtonum(str) Examine str, and return its numeric value. If str begins ...
-2
votes
1answer
119 views

CTRL+D vs CTRL+C

Is it true to say that CTRL+D stops input execution while CTRL+C stops output displaying (as plain data, without execution)?
0
votes
1answer
24 views

Adding an input to a pipelined command

I use a pipelined command in an alias to start a docker server (e.g alias ent="echo -e '\n';docker-compose up|grep --color ERROR"). The server sometimes asks me a question, to which I should input y ...
2
votes
1answer
87 views

Access grab state of evdev device

I need to retrieved the grab state of an evdev device in a program. More specifically, I need to retrieve the state of the grab pointer in the evdev struct seen here: https://elixir.bootlin.com/linux/...
1
vote
0answers
82 views

How to get position of fingers on touchpad

I want to develop a program which would be able to make use of absolute position of fingers on a touchpad to define custom in-app gestures. I've read that using raw data from evdev is a really bad ...
0
votes
0answers
52 views

Graphic tablet buttons

I have a noname tablet with 12 buttons. I made it work by digimend driver. Pointer works good, but tablet buttons generate mouse_btn events. I'd like these buttons generate custom keyboard events. How ...
0
votes
0answers
27 views

monitoring hardware

I have a laptop with a fingerprint reader that is currently doesn't seem to be supported by linux (integrated in lenovo yoga 920). But I am quite curious if it is at all possible for me to listen to ...
0
votes
0answers
27 views

KEY_UNKNOWN X1 tablet gen3

Some of the multimedia keys on the detachable keyboard of the X1 tablet gen3 (vendorid 17ef product id 60b5) do get mapped to KEY_UNKNOWN. Looking at the usbmon log, the data sent to the controller ...
0
votes
0answers
21 views

Ctrl + Alt + A does not work in Emacs and other applications

I'm currently using Fedora 29 KDE Spin, I noticed that CTRL + ALT + A does not work in spacemacs, and the key combination does not seem to work anywhere. Some people advised me that it might be due to ...
0
votes
1answer
26 views

Directly play input sound (Mint)

I recently set up a Linux Mint 18 machine, which has an electric piano plugged into it via a USB sound card. Now, the input works: we can record sounds from the piano; and the output works as we can ...
-1
votes
1answer
86 views

Bash: Is it better to echo or <<<? [closed]

When passing input, which method is better? > echo 'test' | base64 dGVzdAo= > base64 <<< 'test' dGVzdAo= With variables as well, which method should be use? > t='test' > ...
2
votes
2answers
102 views

Bash: how to properly accept user input?

I couldn't find an example online but I'm sure I've seen shell coders use ${1:--} to accept user input. Here's an example: #!/bin/bash var="${1:--}" echo "$var" Then, run it: $ ./test.sh "this is ...
0
votes
1answer
336 views

Libinput transformation matrix for rotating the input coordinates

Take a look at the official documentation for libinput's coordinate transformation matrix: https://wayland.freedesktop.org/libinput/doc/1.1.0/group__config.html#ga09a798f58cc601edd2797780096e9804 ...
3
votes
0answers
20 views

Unicode overwriting keyboard shortcuts

I needed to input some Russian characters so used setxkbmap ru. To switch back I used setxkbmap gb (from awkwardly compounding previous commands from history - be warned...) But now when I use ...
2
votes
2answers
556 views

How to completely inhibit lid switch events?

Context: Due to missing drivers for my 2-in-1 convertible, folding the screen back only triggers a lid switch event. This causes the laptop to suspend or, when "Suspend when laptop lid is closed" is ...
1
vote
1answer
41 views

Detecting keyup

If I type: $ xinput test 14 and press and hold return, I get: key release 36 key press 36 key release 36 key press 36 ... until I release. Questions Is it possible to detect when I ...
0
votes
2answers
756 views

Dell Latitude 5590 Trackpoint not listed in xinput list

I recently installed Debian 9 on my new Dell Latitude 5590 notebook when I realized the pointing stick as well as the three buttons above the touchpad do not work. They work in Ubuntu out of the box. ...
3
votes
4answers
218 views

Create files from a list of text files

I created a file using: $ ls > ls.txt Now I want to go to a different directory and use this file to create a bunch of empty files with the names from each line of ls.txt. What is the easiest ...
0
votes
1answer
41 views

What is the intention of KEY_NEXT compared to KEY_NEXTSONG?

I'm in the process of mapping IR remote buttons in LIRC. I looked through input-event-codes.h and came across KEY_NEXT and KEY_NEXTSONG, so I did some searching but I couldn't find descriptions for ...
1
vote
3answers
1k views

How to use command output (ls) into other command's input (sox)?

I have a folder with multiple .wav files that I am trying to concatenate in order but I think that I am too inexperienced with bash commands to do this as efficient as possible. You see, I don't know ...
0
votes
1answer
2k views

ls: reading directory '.': Input/output error

xubuntu, NTFS. When I trying to open directory with files: username@username-hp:/media/username/dir1/dir2/music$ la ls: reading directory '.': Input/output error Also if I open the directory with ...
0
votes
0answers
44 views

Android's touchscreen key events on Linux

I am working on a Halium port for an Android device that has a Synaptics touchscreen (synaptics_dsx driver). The port is on a mature stage, has a Wayland compositor running, and the apps are provided ...
0
votes
1answer
708 views

pass a variable value as an input to an oracle sql file that is being called from a shell script

Wanted to know if it is possible to "pass a variable value as an input to an oracle sql file that is being called from a shell script" I am trying like this, but its not working: SQL file: set head ...
2
votes
1answer
1k views

Why can't an input file be an output file?

Specifically in the case of cat x y > y and cat x >> x where x and y are files. What would happen if I didn't get a "input file is output file" error? Basically, why am I not allowed to run ...
1
vote
1answer
47 views

Type Y to Delete, if the script is being executed manually

This is a 2 part question. Scenario: This script is on a cronjob. If a folder does not exist, the system sends us an email that opens a ticket which notifies us that the folder is not available. We ...
0
votes
0answers
67 views

expect script to automate utility

we want to automate the utility - "Setup ambari-server" this utility ask 4 default questions , and all answers should be default (no) how to use expect script to automate this utility ? ambari-...
0
votes
2answers
61 views

Send quit keystroke (Q + Enter) to program after running for a certain period of time

Some terminal programs have a quit keystroke to safely stop their execution, for example: Q+Enter From this question I learned that the timeout command allows to send signals to a program after a ...
1
vote
3answers
2k views

How can I run a shell script on input device event

I have a USB remote presenter that appears as a keyboard. Using evtest I can see the input events from the device. How can I capture those events in a shell script? I had see some solutions using C ...
3
votes
3answers
2k views

How send multiple command as input in a program?

I know how send a command as a input in a program like this: echo toto | ./my_prog And with process substitution + redirection: r < <(echo toto) But how to do this if I want to input a ...
1
vote
0answers
334 views

How to control how udev tags the input devices?

I create virtual devices using uinput that are then properly detected by udev which seems to be assigning a tag like "mouse" or "tablet". I guess udev does this by judging the capabilities set for ...
2
votes
0answers
237 views

How to use Mouse Wheel Emulation?

I have a pointing device without a scroll wheel, but I'd like to be able to scroll with it, perhaps by holding down a key and dragging. I've seen a few threads about similar topics, but none of the ...
0
votes
2answers
602 views

How to read extra keys from keyboard (Steelseries APEX 300)

I try to get the extra keys of the Steelseries APEX 300 working. The main keys and the standard special keys working correctly. At the end I want to write a small app (C/C++ Qt) to assign some ...
1
vote
2answers
104 views

read value validation

Is there a way to validate or confirm that the user wrote what it meant to write in read? For example, the user meant to write "Hello world!" but mistakenly wrote "Hello world@". This is very similar ...
0
votes
1answer
215 views

Debugging USB events - Lenovo wacom active pen

I am using an active pen (one that has a battery) on my Touchpad and it has stopped working. I am trying to find out whether the problem is in the hardware or software. The touchscreen is working fine,...
2
votes
1answer
178 views

I can't use the letter “d” on commandline

When I'm logged as user or root I cannot type the letter d on a terminal, and if I paste a word containing it the d is erased. I can type it in the graphical interface (i3wm) and in non-graphical ...
2
votes
1answer
76 views

Unable to type diaeresis using keyboard

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 (...
0
votes
1answer
1k views

Reading /dev/input/ of PS/2 keyboard

I'm currently working on a project where I want to control my PC with an AVR, via emulating a PS/2 keyboard. For this reason I currently have all the required hardware and some software libs, such as ...
4
votes
1answer
3k views

it's possible to send input to a tmux session without connecting to it?

Is there any command that I can use to send input or commands to a given tmux session / pane without connecting to it? It's for unattended access, I've a console application running on a tmux ...
1
vote
1answer
101 views

What does an application read when the user press a backspace in the terminal in raw mode?

In raw mode, if you type a character in the terminal, the application on the other side will read the ASCII code for the typed character. But what about when you press the backspace key in the ...
1
vote
0answers
59 views

A special character is added to my input every second, messing up my commands and passwords [duplicate]

I've been looking for any case similar to mine and still haven't found one. The story: I'm using arch linux, updated just last week, and it was working fine. I never configured auto-login, so I have ...
1
vote
0answers
126 views

Identify device by its handler

I'm looking for a robust method for identifying a device's type (mouse, keyboard, joystick) by its input event handler. There are parameters which cannot be trusted, such as device name/vendor-id etc....
1
vote
0answers
61 views

false keystrokes in linux only [duplicate]

I have an annoying issue, it's as if linux thinks I'm pressing the Fn key every second. doesn't happen in windows though. Its preventing me from logging into arch. I can enter my LUKS password fine, ...
5
votes
2answers
1k views

ctrl+shift+e causes beeping

I recently got a new laptop and installed Arch on it. I noticed that in a few applications, including chrome and gedit, pressing ctrl+shift+e will cause the next few keys pressed to be underlined, ...
0
votes
0answers
1k views

Debugging an unresponsive touchpad on Lenovo Ideapad 320-15ABR

I have a Lenovo Ideapad 320-15ABR, (I found the exact model name with dmidecode). I'm having trouble getting the touchpad to work. It's not showing up in xinput --list or cat /proc/bus/input/devices. ...
0
votes
1answer
31 views

How can I make this menu in bash error me if the input option is incorrect

I have this menu but the option to give the user an error if the input text is wrong doesn´t work. if [ -n "$1" -a -n "$2" -a -f "$1" ] then dts=($(cat $1 | cut -d: -f$2)) for i in ${!dts[@...
0
votes
1answer
344 views

Disable mouse pointer but read the mouse events

There are similar questions on this site, but my scenario is bit different. I have an additional mouse; lets call it X. I use a python script to read X movement (read /dev/input/mouse1) which I use ...
5
votes
3answers
4k views

How to pipe commands to a process running in the background?

This is my loop program, running in the background and waiting for a command. #include <iostream> using namespace std; char buffer[256]; int main(int argc, char *argv[]) { while(true){ ...