dgibson / quickcalld

Program to allow use of Logitech Quickcall Speakerphone under Linux
4 stars 3 forks source link

Can the buttons of quickcall be mapped to some keyboard hotkey? #1

Open 3togo opened 6 years ago

3togo commented 6 years ago

Your driver is awesome but I wonder whether the users could assign some hotkey to this button so that

whenever I press a button(say mute button) in quickcall, it triggers a keyboard hotkey (say ctr+M) or vice versa

https://support.skype.com/en/faq/FA12025/what-are-hotkeys-and-how-do-i-use-them-in-skype Ctrl + E | [Command]+Shift+[H] | Hang up Ctrl + M | [Command]+Shift+[M] | Mute

dgibson commented 6 years ago

On Sun, Jun 17, 2018 at 01:02:25AM +0000, 3togo wrote:

Your driver is awesome but I wonder whether the users could assign some hotkey to this button so that

whenever I press a button(say mute button) in quickcall, it triggers a keyboard hotkey (say ctr+M) or vice versa

https://support.skype.com/en/faq/FA12025/what-are-hotkeys-and-how-do-i-use-them-in-skype Ctrl + E | [Command]+Shift+[H] | Hang up Ctrl + M | [Command]+Shift+[M] | Mute

It should be possible, but it's not as easy as you'd think. Keyboard handling under X is pretty complicated and has a lot of layers, so I'm not quite sure what would be the right place to inject the hotkey events.

I'm afraid this is something I don't have time to look into, but I'd be happy to apply patches which add this functionality.

-- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT the other | way around! http://www.ozlabs.org/~dgibson

3togo commented 6 years ago

thank you for yr reply.i am thinking of whether it can be done using xdotoolhttp://manpages.ubuntu.com/manpages/trusty/man1/xdotool.1.html上午9:24, 2018年6月18日, David Gibson notifications@github.com:On Sun, Jun 17, 2018 at 01:02:25AM +0000, 3togo wrote:

Your driver is awesome but I wonder whether the users could assign some hotkey to this button so that

whenever I press a button(say mute button) in quickcall, it triggers a keyboard hotkey (say ctr+M) or vice versa

https://support.skype.com/en/faq/FA12025/what-are-hotkeys-and-how-do-i-use-them-in-skype Ctrl + E | [Command]+Shift+[H] | Hang up Ctrl + M | [Command]+Shift+[M] | Mute

It should be possible, but it's not as easy as you'd think. Keyboard handling under X is pretty complicated and has a lot of layers, so I'm not quite sure what would be the right place to inject the hotkey events.

I'm afraid this is something I don't have time to look into, but I'd be happy to apply patches which add this functionality.

-- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT the other | way around! http://www.ozlabs.org/~dgibson

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

-- Sent from Yandex.Mail for mobile

dgibson commented 6 years ago

On Tue, Jun 19, 2018 at 06:07:32AM +0000, 3togo wrote:

thank you for yr reply.i am thinking of whether it can be done using xdotoolhttp://manpages.ubuntu.com/manpages/trusty/man1/xdotool.1.html

I think it would be possible, though I'm not sure if it's the best way. The main difficulty would be that quickcalld runs as a system-wide process, whereas xdotool assumes you're within a specific X session. In order to invoke xdotool, you'd have to select a specific X session with the DISPLAY variable, and you'd need to do something to get the correct X authority to do so.

上午9:24, 2018年6月18日, David Gibson notifications@github.com:On Sun, Jun 17, 2018 at 01:02:25AM +0000, 3togo wrote:

Your driver is awesome but I wonder whether the users could assign some hotkey to this button so that

whenever I press a button(say mute button) in quickcall, it triggers a keyboard hotkey (say ctr+M) or vice versa

https://support.skype.com/en/faq/FA12025/what-are-hotkeys-and-how-do-i-use-them-in-skype Ctrl + E | [Command]+Shift+[H] | Hang up Ctrl + M | [Command]+Shift+[M] | Mute

It should be possible, but it's not as easy as you'd think. Keyboard handling under X is pretty complicated and has a lot of layers, so I'm not quite sure what would be the right place to inject the hotkey events.

I'm afraid this is something I don't have time to look into, but I'd be happy to apply patches which add this functionality.

-- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT the other | way around! http://www.ozlabs.org/~dgibson

3togo commented 6 years ago

on second thoughts, using thd might be better.http://manpages.ubuntu.com/manpages/bionic/man1/thd.1.html上午9:47, 2018年6月22日, David Gibson notifications@github.com:On Tue, Jun 19, 2018 at 06:07:32AM +0000, 3togo wrote:

thank you for yr reply.i am thinking of whether it can be done using xdotoolhttp://manpages.ubuntu.com/manpages/trusty/man1/xdotool.1.html

I think it would be possible, though I'm not sure if it's the best way. The main difficulty would be that quickcalld runs as a system-wide process, whereas xdotool assumes you're within a specific X session. In order to invoke xdotool, you'd have to select a specific X session with the DISPLAY variable, and you'd need to do something to get the correct X authority to do so.

上午9:24, 2018年6月18日, David Gibson notifications@github.com:On Sun, Jun 17, 2018 at 01:02:25AM +0000, 3togo wrote:

Your driver is awesome but I wonder whether the users could assign some hotkey to this button so that

whenever I press a button(say mute button) in quickcall, it triggers a keyboard hotkey (say ctr+M) or vice versa

https://support.skype.com/en/faq/FA12025/what-are-hotkeys-and-how-do-i-use-them-in-skype Ctrl + E | [Command]+Shift+[H] | Hang up Ctrl + M | [Command]+Shift+[M] | Mute

It should be possible, but it's not as easy as you'd think. Keyboard handling under X is pretty complicated and has a lot of layers, so I'm not quite sure what would be the right place to inject the hotkey events.

I'm afraid this is something I don't have time to look into, but I'd be happy to apply patches which add this functionality.

-- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT the other | way around! http://www.ozlabs.org/~dgibson

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

-- Sent from Yandex.Mail for mobile

dgibson commented 6 years ago

On Fri, Jun 22, 2018 at 09:10:20AM +0000, 3togo wrote:

on second thoughts, using thd might be better.http://manpages.ubuntu.com/manpages/bionic/man1/thd.1.html

I don't know much about thd either, but yes I think it might be a better option. Note that the quickcall already does generate keystrokes when the buttons are pressed - they're vendor specific keycodes delivered via the USB HID device. thd might be able to catch those and remap them to something more useful.

上午9:47, 2018年6月22日, David Gibson notifications@github.com:On Tue, Jun 19, 2018 at 06:07:32AM +0000, 3togo wrote:

thank you for yr reply.i am thinking of whether it can be done using xdotoolhttp://manpages.ubuntu.com/manpages/trusty/man1/xdotool.1.html

I think it would be possible, though I'm not sure if it's the best way. The main difficulty would be that quickcalld runs as a system-wide process, whereas xdotool assumes you're within a specific X session. In order to invoke xdotool, you'd have to select a specific X session with the DISPLAY variable, and you'd need to do something to get the correct X authority to do so.

上午9:24, 2018年6月18日, David Gibson notifications@github.com:On Sun, Jun 17, 2018 at 01:02:25AM +0000, 3togo wrote:

Your driver is awesome but I wonder whether the users could assign some hotkey to this button so that

whenever I press a button(say mute button) in quickcall, it triggers a keyboard hotkey (say ctr+M) or vice versa

https://support.skype.com/en/faq/FA12025/what-are-hotkeys-and-how-do-i-use-them-in-skype Ctrl + E | [Command]+Shift+[H] | Hang up Ctrl + M | [Command]+Shift+[M] | Mute

It should be possible, but it's not as easy as you'd think. Keyboard handling under X is pretty complicated and has a lot of layers, so I'm not quite sure what would be the right place to inject the hotkey events.

I'm afraid this is something I don't have time to look into, but I'd be happy to apply patches which add this functionality.

-- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT the other | way around! http://www.ozlabs.org/~dgibson