Author Topic: left/middle/right mouse clicks and F1-F12 and Insert keystrokes  (Read 4952 times)

Jeffrey Mark Siskind

  • Newbie
  • *
  • Posts: 11
    • View Profile
The twm+emacs setup that I have used for four decades on all of my Unix and then later Linux machines (dekstops, laptops, PDAs, ...) relies on left/middle/right mouse clicks and ability to type the F1-F12 and Insert keystrokes. Can I do this in DebianTP2? How?

My standard setup (which at this point is neurally encoded) uses F1-F10 to select different (emacs, xpdf, xcalc, ...) windows.

I tried setting up .twmrc with

"F10"      =  : all          : f.warpto "xcalc"
"F10"      =  s : all          : f.warpto "xcalc"
"F10"      =  m1 : all          : f.warpto "xcalc"
"F10"      =  s | m1 : all          : f.warpto "xcalc"

with m1 varying among m2, m3, m4, and m5 but none of them worked. Any ideas?

frnzndr

  • Newbie
  • *
  • Posts: 13
    • View Profile
left/middle/right mouse clicks and F1-F12 and Insert keystrokes
« Reply #1 on: July 15, 2018, 09:52:20 am »
So my inability to get a right mouse-click to work isn't just my own misconfiguration, it doesn't work for anyone (except for the alternative driver in another thread which uses the touchscreen as a trackpad)?

If anyone knows how to get a right click on the touchscreen, I'd love to hear about solutions! I tried using evdev instead of libinput, but that didn't help (maybe expectedly considering libinput is more modern).

The F1-F12 keys would also be useful to get to. Somewhere I read that you should be able to get them with Fn+Shift+1-12, maybe give that a try. It might work in the native Linux, does not in a chroot running via Android, but maybe that is to be expected. (I decided yesterday to try a chrooted Linux for the time being, as I need newer packages than those provided in stretch and using testing or even stretch-backports seems to break the ability to boot into the native linux.)

Eric BF

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
left/middle/right mouse clicks and F1-F12 and Insert keystrokes
« Reply #2 on: July 15, 2018, 05:21:14 pm »
Quote from: frnzndr
The F1-F12 keys would also be useful to get to. Somewhere I read that you should be able to get them with Fn+Shift+1-12, maybe give that a try. It might work in the native Linux, does not in a chroot running via Android, but maybe that is to be expected.
F1 through F10 do indeed work with Fn+Shift+ 1 through 0. Problem is getting F11 and F12...

And you are right that there does not seem to be any way of getting right (or middle) mouse button clicks.
Gemini 4G Debian
OpenPandora with Debian

DonOregano

  • Newbie
  • *
  • Posts: 24
    • View Profile
left/middle/right mouse clicks and F1-F12 and Insert keystrokes
« Reply #3 on: July 15, 2018, 06:26:25 pm »
Quote from: Eric BF
And you are right that there does not seem to be any way of getting right (or middle) mouse button clicks.

What stuff have people tried? Read about something called Touchégg (https://code.google.com/archive/p/touchegg/) that might be worth a shot?

My Gemini is out of commission for the time being (4G woes), so I can't try it myself.

tuk0z

  • Newbie
  • *
  • Posts: 45
    • View Profile
left/middle/right mouse clicks and F1-F12 and Insert keystrokes
« Reply #4 on: July 16, 2018, 08:22:44 am »
Quote from: frnzndr
So my inability to get a right mouse-click to work isn't just my own misconfiguration, it doesn't work for anyone (except for the alternative driver in another thread which uses the touchscreen as a trackpad)?

If anyone knows how to get a right click on the touchscreen, I'd love to hear about solutions! I tried using evdev instead of libinput, but that didn't help (maybe expectedly considering libinput is more modern).

The F1-F12 keys would also be useful to get to. Somewhere I read that you should be able to get them with Fn+Shift+1-12, maybe give that a try. It might work in the native Linux, does not in a chroot running via Android, but maybe that is to be expected. (I decided yesterday to try a chrooted Linux for the time being, as I need newer packages than those provided in stretch and using testing or even stretch-backports seems to break the ability to boot into the native linux.)

Using testing or even stretch-backports breaks the ability to boot into the native linux: I can confirm this. I'll try to chroot into it and find out (via logs) then downgrade the culprit package(s). Untill then I can't help testing mouse/keystroke (remapping) tools :/

Eric BF

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
left/middle/right mouse clicks and F1-F12 and Insert keystrokes
« Reply #5 on: July 16, 2018, 11:30:19 am »
Quote from: tuk0z
Using testing or even stretch-backports breaks the ability to boot into the native linux: I can confirm this. I'll try to chroot into it and find out (via logs) then downgrade the culprit package(s). Untill then I can't help testing mouse/keystroke (remapping) tools :/
My approach is to be very selective in upgrading any packages, making sure I only upgrade those that do not require upgrades to key system components.  stretch-backports gives me access to what I need without breaking my system.

If I need to be at the bleeding edge for any particular Debian package, there's (almost) always the possibility of simply building the package myself.  I've done this, for instance, with Emacs for which snapshots are only available for other architectures.
Gemini 4G Debian
OpenPandora with Debian

DJO

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
left/middle/right mouse clicks and F1-F12 and Insert keystrokes
« Reply #6 on: July 16, 2018, 01:36:17 pm »
Quote from: Eric BF
Problem is getting F11 and F12...

I read somewhere that the lid switches are on F11 & F12 which may or may not be true, not sure how you'd go about testing it though.

Eric BF

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
left/middle/right mouse clicks and F1-F12 and Insert keystrokes
« Reply #7 on: July 16, 2018, 04:48:05 pm »
Quote from: DJO
I read somewhere that the lid switches are on F11 & F12 which may or may not be true, not sure how you'd go about testing it though.
I guess you could run xev and copy  the output to a file to see what happens when you close and open the lid. But even if so, I'm not sure how useful this would be.

It is, of course, possible to map some key combination to generate F11 and F12 using xmodmap.  But easier probably to assign any functions that would normally be on those keys to other keys.
Gemini 4G Debian
OpenPandora with Debian

Kiriririn

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
left/middle/right mouse clicks and F1-F12 and Insert keystrokes
« Reply #8 on: July 17, 2018, 10:59:22 am »
Quote from: DJO
Quote from: Eric BF
Problem is getting F11 and F12...

I read somewhere that the lid switches are on F11 & F12 which may or may not be true, not sure how you'd go about testing it though.

That isn't the case any more https://github.com/gemian/gemini-linux-kern...47c8967963d6b0f

frnzndr

  • Newbie
  • *
  • Posts: 13
    • View Profile
left/middle/right mouse clicks and F1-F12 and Insert keystrokes
« Reply #9 on: August 18, 2018, 04:20:18 pm »
Has anyone found a way to get a right mouseclick? (Or any non-left click, for that matter)

loop

  • Newbie
  • *
  • Posts: 19
    • View Profile
left/middle/right mouse clicks and F1-F12 and Insert keystrokes
« Reply #10 on: August 19, 2018, 06:42:36 am »
Quote from: frnzndr
Has anyone found a way to get a right mouseclick? (Or any non-left click, for that matter)

To use the silver button as right mouse button:
Code: [Select]
xkbset m
xmodmap -e "keycode 239 = Pointer_Button3"
To use Fn+H as right mouse button:
Code: [Select]
xkbset m
xmodmap -e "keycode 43 = h H VoidSymbol VoidSymbol Pointer_Button3 Pointer_Button3"

gemini_user_j

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
left/middle/right mouse clicks and F1-F12 and Insert keystrokes
« Reply #11 on: August 19, 2018, 12:04:59 pm »
Quote from: loop
Quote from: frnzndr
Has anyone found a way to get a right mouseclick? (Or any non-left click, for that matter)

To use the silver button as right mouse button:
Code: [Select]
xkbset m
xmodmap -e "keycode 239 = Pointer_Button3"
To use Fn+H as right mouse button:
Code: [Select]
xkbset m
xmodmap -e "keycode 43 = h H VoidSymbol VoidSymbol Pointer_Button3 Pointer_Button3"

Hey, this is really cool, but I messed up my keyboard layout in half way through modifying the keys:
I just did a sudo apt install xkbset and ran it with --help to see the options.

I also did a sudo xmodmap -pke and got a whole list of all my keys.

Something got a bit weird, while I was trying to figure out what the columns after = are.
On my gemini, I have up to 7 entries, and I have the following guess:

1, key
2, key + shift
3, key + ?
4, key + ? + shift
5, key + fn
6, key + fn + shift
7, key + fn + ??

I found a wikipage from archlinux https://wiki.archlinux.org/index.php/xmodmap
where they only list 6 different combinations:
Quote
Each keysym column in the table corresponds to a particular combination of modifier keys:
1. Key
2. Shift+Key
3. Mode_switch+Key
4. Mode_switch+Shift+Key
5. ISO_Level3_Shift+Key
6. ISO_Level3_Shift+Shift+Key

from this wiki, I would guess that ISO_Level3_Shift would be fn
'Mode_switch' I am not sure about, I would have guessed alt, but when I tried typing in chromium while holding alt, nothing happened.

However to get to the weird thing:

My gemini switched from US-International to Canadian Multiligual: http://xahlee.info/kbd/i18n_keyboard_layouts.html

It was only after trying to type some scandinavian characters I noticed something was a bit odd, and only when I spotted the images from the link above, I realized what had happened.

In LXQt settings --> Keyboard and Mouse, I dont even have a menu for English Canadian layout, and my settings are still English (US) but I dont see the regular US-international, but many others, that I would expect.

If I set the settings to English (US, intl., with dead keys) I still get the Canadian Multiligual layout.

This is really the weirdest thing I have experienced though my 10 years of using linux.


So where as I very much would like to get rid of that spoken time when hitting the silver side button,
I would really like to hear if anyone has an idea on how to reset/reconfigure the keyboard layout.

cheers!
I will edit this post if I find a solution
Gemini PDA x27