Mouse click/Touchscreen behavior - How to modify?
Mouse click/Touchscreen behavior - How to modify?
Does anyone know if it is possible to hijack a leftclick, centreclick or rightclick on a mouse? At present, if i leftclick my mouse on an open space on the desktop nothing happens. If I rightclick I see the puppy menu display. (this is a slacko 5.6 derivative).
If I leftclick a desktop icon I get the target program opening, but if I rightclick that icon I get a Rox context menu.
Is there any way to change those default behaviours? If so, do I need to modify jwm, or the actual puppy?
What I would like to do is change the leftclick so that it brought up a 'secondary menu' for example - if I leftclicked the 'edit' icon on the desktop I don't want it to bring up geany, I want it to bring up a secondary menu which might have options such as:
1) Open original target (ie Geany)
2) Wait 5 seconds then open Geany
3) Modify current desktop icon
4) Open recent documents menu
5) Open the (usually rightclick) context menu for this icon
6) Drag this item.
I guess I really want to be able to decide if a 'click' in any given spot should be treated exactly like it would in a current puppy, or be treated in some new 'hijacked' way.
Just as a bit of background - I want to make a puppy run on a touchscreen tablet where there is no rightclick button, just the 'leftclick' function of a finger tapping on the touchscreen. If I can get a leftclick to bring up a secondary menu rather than the normal menu/action then I think I can make progress.
If I leftclick a desktop icon I get the target program opening, but if I rightclick that icon I get a Rox context menu.
Is there any way to change those default behaviours? If so, do I need to modify jwm, or the actual puppy?
What I would like to do is change the leftclick so that it brought up a 'secondary menu' for example - if I leftclicked the 'edit' icon on the desktop I don't want it to bring up geany, I want it to bring up a secondary menu which might have options such as:
1) Open original target (ie Geany)
2) Wait 5 seconds then open Geany
3) Modify current desktop icon
4) Open recent documents menu
5) Open the (usually rightclick) context menu for this icon
6) Drag this item.
I guess I really want to be able to decide if a 'click' in any given spot should be treated exactly like it would in a current puppy, or be treated in some new 'hijacked' way.
Just as a bit of background - I want to make a puppy run on a touchscreen tablet where there is no rightclick button, just the 'leftclick' function of a finger tapping on the touchscreen. If I can get a leftclick to bring up a secondary menu rather than the normal menu/action then I think I can make progress.
Last edited by greengeek on Tue 17 Jun 2014, 10:45, edited 2 times in total.
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
What happens when you click on the desktop is determined by the window manager. If you are using JWM then you can change the opening of the menu from right-click to left-click by changing <RootMenu onroot="3"> to <RootMenu onroot="1"> in the file containing the menu. In total you can have 5 different menus assigned to 5 different mouse actions. See also here.
Thats interesting - when I make that change in /root/.jwmrc it does swap the behaviour of leftclick and rightclick on the open desktop area, but it also removes my ability to click the main 'MENU' button.MochiMoppel wrote: If you are using JWM then you can change the opening of the menu from right-click to left-click by changing <RootMenu onroot="3"> to <RootMenu onroot="1"> in the file containing the menu.
If I make that change within the /etc/xdg/templates/_root_.jwmrc file it seems to have no effect.
(using slacko 5.6 here)
Hello Everyone. And thanks to @Greengeek for trying to focus some present day knowledge in what is known and proven in Puppyland about mouse and touch use, currently.
Here's my knowledge (of which some of you have already had "some" experiences with this). I will use the MOST ADVANCE of PUPs in this area; namely LightHouse64 (LH64).
TaZoC, the author realized, that current WM in Puppyland do not possess the foundation for touch to work in the UI in the same way it does on say smartPhones/smartTablets/etc. where touch is one of the primary methods of system manipulation. Understanding this, he was so astute in observation to recognize that a very simple change in system behavior with its mouse, would provide much ability for a LightHouse64 user to manage much of what the system offer ... not everything, but much. He surmised that simply changing what happen with a mouse-click on the open desktop would be a simple, yet very very useful solution to give limited functionality to any user with a touchscreen PC.
ANYONE who has booted Lighthouse V6xx+ knows that if you click Mouse button 1, left-click button, you will get to the System "Menu". This IS NOT HOW ALL OTHER PUPs work (Since in prior PUP use, this is relegated to mouse 3, right-click, button). And, everyone who uses touch, knows that the finger tap/touch to the screen is a mouse click. This primary change, not to mention that somehow he got the mouse tracking right, gave LH64 uses, a now 3 year headstart on bringing functionality into a touchscreen users hands (no pun intended).
I have loaded this, Live DVD, on other users HP Touchsmart PCs who were having problems with Windows and find they continue to use it today. I personally, have a HP 23" Touchsmart (Intel processor) and an HP Touchsmart Laptop (AMD processor) where I use the touch facility for just about everything I do with a mouse 1 button. I drag, I drop, I pull window screens around on desktop,I resize windows, I double-click to execute applications, I open/close Menu, I execute Menu items by touching open screen and choosing the app I want, I ...
NONE of this is available in any other PUP, to date, but,I know of at least one other developer who has at least dipped his toe into the water in looking to bring some touch capability to his distro users.
For TaZoC, he took something very simple and added a "touch" of intuitive approach without changing almost nothing in his PUP distro.
I cannot read scripts very well, and I am not up to task on system architecture,but, for those who do understand PUP architecture, his adaptation "may" be easy to discover.
LH64 is not a distro geared to touch users. It is a general purpose distro which attempts to provide a easy intuitive user experience with its Mariner edition to provide a fuller OOTB experience. In fact, (although the author has NEVER asserted this, I have found that it provide a superior matching blend of subsystems which provide what a Windows/Apple user gets, OOTB). In providing a General Purpose solution, he throws in the touch capability for our use.
If you have a touch PC you owe it to yourself to take a look at this. If you do NOtT have a touch PC, you owe it to yourself to boot and look at what he provides with mouse clicks on the open desktop, if, for no other reason. (Post any experience you have on the LH64 forum thread.
That is my, external view/offering. Anyone wanting me to test any PUP variations to assist, I can and I will.
Hope that personal biases does not limit the ability to provide usefulness.
Here to help
Here's my knowledge (of which some of you have already had "some" experiences with this). I will use the MOST ADVANCE of PUPs in this area; namely LightHouse64 (LH64).
TaZoC, the author realized, that current WM in Puppyland do not possess the foundation for touch to work in the UI in the same way it does on say smartPhones/smartTablets/etc. where touch is one of the primary methods of system manipulation. Understanding this, he was so astute in observation to recognize that a very simple change in system behavior with its mouse, would provide much ability for a LightHouse64 user to manage much of what the system offer ... not everything, but much. He surmised that simply changing what happen with a mouse-click on the open desktop would be a simple, yet very very useful solution to give limited functionality to any user with a touchscreen PC.
ANYONE who has booted Lighthouse V6xx+ knows that if you click Mouse button 1, left-click button, you will get to the System "Menu". This IS NOT HOW ALL OTHER PUPs work (Since in prior PUP use, this is relegated to mouse 3, right-click, button). And, everyone who uses touch, knows that the finger tap/touch to the screen is a mouse click. This primary change, not to mention that somehow he got the mouse tracking right, gave LH64 uses, a now 3 year headstart on bringing functionality into a touchscreen users hands (no pun intended).
I have loaded this, Live DVD, on other users HP Touchsmart PCs who were having problems with Windows and find they continue to use it today. I personally, have a HP 23" Touchsmart (Intel processor) and an HP Touchsmart Laptop (AMD processor) where I use the touch facility for just about everything I do with a mouse 1 button. I drag, I drop, I pull window screens around on desktop,I resize windows, I double-click to execute applications, I open/close Menu, I execute Menu items by touching open screen and choosing the app I want, I ...
NONE of this is available in any other PUP, to date, but,I know of at least one other developer who has at least dipped his toe into the water in looking to bring some touch capability to his distro users.
For TaZoC, he took something very simple and added a "touch" of intuitive approach without changing almost nothing in his PUP distro.
I cannot read scripts very well, and I am not up to task on system architecture,but, for those who do understand PUP architecture, his adaptation "may" be easy to discover.
LH64 is not a distro geared to touch users. It is a general purpose distro which attempts to provide a easy intuitive user experience with its Mariner edition to provide a fuller OOTB experience. In fact, (although the author has NEVER asserted this, I have found that it provide a superior matching blend of subsystems which provide what a Windows/Apple user gets, OOTB). In providing a General Purpose solution, he throws in the touch capability for our use.
If you have a touch PC you owe it to yourself to take a look at this. If you do NOtT have a touch PC, you owe it to yourself to boot and look at what he provides with mouse clicks on the open desktop, if, for no other reason. (Post any experience you have on the LH64 forum thread.
That is my, external view/offering. Anyone wanting me to test any PUP variations to assist, I can and I will.
Hope that personal biases does not limit the ability to provide usefulness.
Here to help
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
In /root/.jwmrc-tray change the button action from root:3 to root:1greengeek wrote:it does swap the behaviour of leftclick and rightclick on the open desktop area, but it also removes my ability to click the main 'MENU' button.
After your changes you need to run fixmenus, folllowed by jwm -reload. This will update /root/.jwmrc, which should not be edited manually. While you are in _root_.jwmrc you may also want to change the keyboard shortcut (Alt+F1) from root:3 to root:1If I make that change within the /etc/xdg/templates/_root_.jwmrc file it seems to have no effect.
Thanks for those tips. - I see now that there is no point allocating the menu button to root:1 if there is no menu specified in the templates file to tell it what root:1 is mapped to. Once I add a root:1 (or root:2) menu to the templates file I can then change .jwmrc-tray to get the menu button to display that modified menu. (although one thing I dont understand is the behaviour before I did any changes - where the menu button gave identical responses to either a left click, middle click or right click - bringing up the same menu for each, even though there was only the one root:3 menu in the templates file - no root:1 or root:2 specified)
Anyway - this method works fine for open areas of the desktop - I can now make up a new menu attached to the leftclick button. Unfortunately it does not let me hijack a leftclick performed over a desktop icon. If possible, I want a click performed anywhere on the desktop or over a menu or icon to be 'redirectable' to some other script.
Anyway - this method works fine for open areas of the desktop - I can now make up a new menu attached to the leftclick button. Unfortunately it does not let me hijack a leftclick performed over a desktop icon. If possible, I want a click performed anywhere on the desktop or over a menu or icon to be 'redirectable' to some other script.
Hi GC, now that I have access to a Windows touchscreen tablet I am very keen to get puppy to work well on it. Would you be able to check the hardinfo on your touchscreen enabled devices and see what information it offers about the touchscreen manufacturer and driver please? Is there any information suggesting use of a "DWav Scientific" or "e-Galax" device?gcmartin wrote:I personally, have a HP 23" Touchsmart (Intel processor) and an HP Touchsmart Laptop (AMD processor) where I use the touch facility for just about everything I do with a mouse 1 button. I drag, I drop, I pull window screens around on desktop,I resize windows, I double-click to execute applications, I open/close Menu, I execute Menu items by touching open screen and choosing the app I want,
I suspect that loading and using the manufacturers driver is probably the only way to properly control the effect of each mouseclick - there may be no way for me to achieve what I am trying to do on this thread and hijack a true mouseclick. (By contrast, the manufacturers driver will have the built in ability to hijack a 'virtual mouseclick' generated by the touchscreen, which would allow location and duration control)
EDIT : Looks like LH64 is not using jwm anyway - seems like Tazoc used openbox so that may allow different methods of mouseclick configuration. Plenty of testing ahead...
Sorry if this seems like a digression - I just want to relate the mouseclick functionality to the outcomes on a touchscreen tablet: - LH64 seems to have very accurate ability to permit a finger touch to 'click' at exactly the right place. Just want to post here the lsmod output of LH64. In particular "HID_multitouch" module seems of interest:
Code: Select all
bash-4.1# lsmod
Module Size Used by
snd_seq_dummy 1311 0
snd_seq_oss 26744 0
snd_seq_midi_event 5316 1 snd_seq_oss
snd_seq 47331 5 snd_seq_midi_event,snd_seq_oss,snd_seq_dummy
snd_seq_device 4860 3 snd_seq,snd_seq_oss,snd_seq_dummy
snd_pcm_oss 37328 0
snd_mixer_oss 14973 1 snd_pcm_oss
acer_wmi 22312 0
sparse_keymap 2872 1 acer_wmi
wmi 7843 1 acer_wmi
kvm_amd 46354 0
snd_pcsp 7726 0
kvm 256515 1 kvm_amd
k10temp 2866 0
asix 19827 0
libphy 19158 1 asix
usbnet 17598 1 asix
mii 3907 2 asix,usbnet
joydev 9492 0
i2c_piix4 8143 0
uvcvideo 68931 0
videobuf2_core 26764 1 uvcvideo
videodev 98888 2 uvcvideo,videobuf2_core
videobuf2_vmalloc 2736 1 uvcvideo
videobuf2_memops 1831 1 videobuf2_vmalloc
hid_multitouch 8824 0
ath9k 98718 0
mac80211 235902 1 ath9k
ath9k_common 1912 1 ath9k
ath9k_hw 353742 2 ath9k_common,ath9k
ath 14857 3 ath9k_common,ath9k,ath9k_hw
cfg80211 181036 3 ath,ath9k,mac80211
rfkill 14908 2 cfg80211,acer_wmi
fan 2441 0
battery 11064 0
snd_hda_codec_realtek 58754 1
snd_hda_codec_hdmi 26472 1
snd_hda_intel 28392 0
snd_hda_codec 75946 3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
snd_pcm 74858 5 snd_pcm_oss,snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_pcsp
snd_timer 17791 2 snd_pcm,snd_seq
snd 57116 12 snd_hda_codec_realtek,snd_pcm_oss,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_hda_codec,snd_hda_intel,
snd_seq_oss, nd_seq_device,snd_mixer_oss,snd_pcsp
soundcore 5090 1 snd
snd_page_alloc 6890 2 snd_pcm,snd_hda_intel
radeon 863581 2
ttm 59789 1 radeon
drm_kms_helper 33884 1 radeon
drm 210852 4 ttm,drm_kms_helper,radeon
hwmon 1265 2 k10temp,radeon
i2c_algo_bit 5111 1 radeon
ac 3283 0
<root> ~
bash-4.1#
Last edited by greengeek on Tue 17 Jun 2014, 11:13, edited 3 times in total.
Running on the same touchscreen tablet Slacko 5.3.3t does allow the touchscreen to work - but it is different to the 'pinpoint' mode used in LH64. Slacko seems to treat the touchscreen exactly like a touchpad - if you slide your finger across the screen the mouse moves in the correct direction, but not at the same speed as the finger (there is no 'absolute position' correlation"). Once the mouse pointer has reched the place you want it to be you can tap the screen anywhere and the "click" will occur at the place where the mouse pointer is visible.
For comparison the lsmod output on slacko 5.3.3t is:
For comparison the lsmod output on slacko 5.3.3t is:
Code: Select all
# lsmod
Module Size Used by
mperf 851 0
iptable_mangle 904 0
iptable_nat 2575 0
nf_nat 9805 1 iptable_nat
ipt_REJECT 1529 1
nf_conntrack_ftp 4065 0
nf_conntrack_irc 2379 0
iptable_filter 804 1
snd_hda_codec_realtek 192633 1
xt_state 791 4
snd_hda_codec_hdmi 17616 1
nf_conntrack_ipv4 7226 7 iptable_nat,nf_nat
nf_conntrack 37910 6 iptable_nat,nf_nat,nf_conntrack_ftp,nf_conntrack_irc,xt_state,nf_conntrack_ipv4
nf_defrag_ipv4 787 1 nf_conntrack_ipv4
snd_hda_intel 16350 0
snd_hda_codec 54223 3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
snd_hwdep 3704 1 snd_hda_codec
snd_pcm_oss 27363 0
snd_mixer_oss 9846 1 snd_pcm_oss
snd_pcm 46865 4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_pcm_oss
snd_seq_dummy 907 0
ip_tables 7021 3 iptable_mangle,iptable_nat,iptable_filter
arc4 978 2
ath9k 60806 0
mac80211 135762 1 ath9k
ath9k_common 1246 1 ath9k
ath9k_hw 268289 2 ath9k,ath9k_common
ath 10422 2 ath9k,ath9k_hw
cfg80211 113722 3 ath9k,mac80211,ath
asix 10080 0
usbnet 10223 1 asix
uvcvideo 46165 0
videodev 57950 1 uvcvideo
snd_seq_oss 19155 0
snd_seq_midi 3248 0
snd_seq_midi_event 3636 2 snd_seq_oss,snd_seq_midi
snd_rawmidi 11838 1 snd_seq_midi
snd_seq 32220 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_seq_device 3541 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
snd_timer 11743 2 snd_pcm,snd_seq
fan 1714 0
battery 8263 0
sparse_keymap 1936 0
rfkill 9954 1 cfg80211
pcspkr 1195 0
k10temp 1911 0
i2c_piix4 6424 0
i2c_core 12559 2 videodev,i2c_piix4
shpchp 17907 0
snd 32906 13 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm_oss,snd_mixer_oss,
snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_seq_device,snd_timer
soundcore 3321 1 snd
snd_page_alloc 4685 2 snd_hda_intel,snd_pcm
wmi 5863 0
thermal 6162 0
evdev 5816 0
video 9383 0
button 3275 0
processor 20513 2
thermal_sys 9722 4 fan,thermal,video,processor
hwmon 965 2 k10temp,thermal_sys
ac 2293 0
fuse 47599 0
aufs 119852 73
squashfs 18852 1
#
In order to hijack what happens when you click/touch a desktop icon being managed by ROX, you need to create a small AppDir for each 'function' which acts as a wrapper around the wanted behaviour. For instance, left-click would open a drop-down menu with selection of actions. I do these using aewmmenu.
Thanks amigo. That suggestion has allowed me to pick up an interesting thread here which also has some good info about jwm and configuring the root menus discussed above.
It also offers a link to aewmmenu:
http://distro.ibiblio.org/pub/linux/dis ... m-clients/
It also offers a link to aewmmenu:
http://distro.ibiblio.org/pub/linux/dis ... m-clients/
amigo - I am trying to read up on aewmmenu, from your experience do you know if it is possible to use this to pass the cursor position of the original 'click', through to the programme that aewmmenu triggers?
ie: imagine that the aewmmenu ofered a menu consisting of:
Option 1) "Left click at original location"
Option 2) "Right click at original location"
and I clicked a pixel at, say, x=150 and y=300 - could aewmmenu pass (150,300) through to the programme (say, xdotool) that it called via the menu?
ie: imagine that the aewmmenu ofered a menu consisting of:
Option 1) "Left click at original location"
Option 2) "Right click at original location"
and I clicked a pixel at, say, x=150 and y=300 - could aewmmenu pass (150,300) through to the programme (say, xdotool) that it called via the menu?
Just thought I'd mention an idea I've been trying as a way of getting a rightclick function on a device that has no rightclick button - my Acer Iconia tablet has a "Windows" key on the front (not much else; just a power button and vol up/down) and I thought I would try using the windows key as a rightclick button.
It seems to work ok:
Add a line to /root/.jwm.jwmrc-personal:
(used xev first to confirm that the windows key triggered the 115 keycode)
Make a script in /usr/bin called "rightclick"
(may not need the sleep delay)
Right click the script and give it executable permissions.
Prerequisites - xdotool
It seems to work ok:
Add a line to /root/.jwm.jwmrc-personal:
Code: Select all
<Key keycode="115">exec:rightclick</Key>
Make a script in /usr/bin called "rightclick"
Code: Select all
#!/bin/bash
sleep 0.1
xdotool click 3 &
Right click the script and give it executable permissions.
Prerequisites - xdotool