Score:0

Is there a way in Ubuntu 22.04 to answer or end a call using shortcut?

cl flag

I'm using Ubuntu 22.04 on HP Zbook 14u G5. There are answer and end a call buttons ob my keyboard. I configured /lib/udev/hwdb.d/60-keyboard.hwdb so that when I press the "pick up the phone" button, evtest shows that I'm pressing KEY_CONNECT. When I press on the "pick up the phone" button, evtest shows that I'm pressing KEY_CANCEL.

Here is a part of my config file:

 KEYBOARD_KEY_66=connect                                # Pickup phone button → connect → XF86Go
 KEYBOARD_KEY_65=cancel                                 # Hangup phone button → cancel → Cancel

evtest return:

Event: time 1668951619.093652, type 4 (EV_MSC), code 4 (MSC_SCAN), value 38
Event: time 1668951619.093652, type 1 (EV_KEY), code 56 (KEY_LEFTALT), value 1
Event: time 1668951619.093652, -------------- SYN_REPORT ------------
Event: time 1668951619.093774, type 4 (EV_MSC), code 4 (MSC_SCAN), value 66
Event: time 1668951619.093774, type 1 (EV_KEY), code 218 (KEY_CONNECT), value 1
Event: time 1668951619.093774, -------------- SYN_REPORT ------------
Event: time 1668951619.100412, type 4 (EV_MSC), code 4 (MSC_SCAN), value db
Event: time 1668951619.100412, type 1 (EV_KEY), code 125 (KEY_LEFTMETA), value 1
Event: time 1668951619.100412, -------------- SYN_REPORT ------------
Event: time 1668951619.174693, type 4 (EV_MSC), code 4 (MSC_SCAN), value 38
Event: time 1668951619.174693, type 1 (EV_KEY), code 56 (KEY_LEFTALT), value 0
Event: time 1668951619.174693, -------------- SYN_REPORT ------------
Event: time 1668951619.174777, type 4 (EV_MSC), code 4 (MSC_SCAN), value 66
Event: time 1668951619.174777, type 1 (EV_KEY), code 218 (KEY_CONNECT), value 0
Event: time 1668951619.174777, -------------- SYN_REPORT ------------
Event: time 1668951619.181347, type 4 (EV_MSC), code 4 (MSC_SCAN), value db
Event: time 1668951619.181347, type 1 (EV_KEY), code 125 (KEY_LEFTMETA), value 0
Event: time 1668951619.181347, -------------- SYN_REPORT ------------
Event: time 1668951621.895508, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1d
Event: time 1668951621.895508, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 1
Event: time 1668951621.895508, -------------- SYN_REPORT ------------
Event: time 1668951621.895534, type 4 (EV_MSC), code 4 (MSC_SCAN), value 38
Event: time 1668951621.895534, type 1 (EV_KEY), code 56 (KEY_LEFTALT), value 1
Event: time 1668951621.895534, -------------- SYN_REPORT ------------
Event: time 1668951621.895596, type 4 (EV_MSC), code 4 (MSC_SCAN), value 65
Event: time 1668951621.895596, type 1 (EV_KEY), code 223 (KEY_CANCEL), value 1
Event: time 1668951621.895596, -------------- SYN_REPORT ------------
Event: time 1668951621.946718, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1d
Event: time 1668951621.946718, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 0
Event: time 1668951621.946718, -------------- SYN_REPORT ------------
Event: time 1668951621.946736, type 4 (EV_MSC), code 4 (MSC_SCAN), value 38
Event: time 1668951621.946736, type 1 (EV_KEY), code 56 (KEY_LEFTALT), value 0
Event: time 1668951621.946736, -------------- SYN_REPORT ------------
Event: time 1668951621.946881, type 4 (EV_MSC), code 4 (MSC_SCAN), value 65
Event: time 1668951621.946881, type 1 (EV_KEY), code 223 (KEY_CANCEL), value 0
Event: time 1668951621.946881, -------------- SYN_REPORT ------------

Is there a way to configure a shortcut in ubuntu so that when I press these buttons (i.e. in Telegram) I can answer or end a call?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.