K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: johnywhy
Date: June 26, 2009 04:22AM

CTRL+N, the newline keystroke on todoist.com, is just one example of a site on which custom keyboard shortcuts are over-ridden by k-meleon.

This problem does not happen with IE or Firefox.

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: guenter
Date: June 26, 2009 03:11PM

Quote
johnywhy
This problem does not happen with IE or Firefox.

I am not sure why You are here then.



Edited 1 time(s). Last edit at 06/26/2009 03:11PM by guenter.

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: johnywhy
Date: July 01, 2009 10:58PM

because this is k-meleon the bug-report thread.

i mentioned that the problem does not occur in ie or firefox, not to prove that they are better browsers than km, but to indicate that the problem is not bad or corrupt web-pages. that helps narrow down the problem to the km browser.



Edited 1 time(s). Last edit at 07/01/2009 11:54PM by johnywhy.

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: JamesD
Date: July 01, 2009 11:36PM

I think, but I don't know for sure, that KM has more pre-defined Accelerator keys. Maybe that is why some override the stuff from a website. You can find a list of the ones in KM here. http://two.xthost.info/kmeleon/lizard/commands.html#l_defaccel

You could try running a macro to disable one that seems to interfere with site that you are using. See the setaccel() function here. http://kmeleon.sourceforge.net/wiki/MacroLanguage2#setaccel

I think that if you set the keys to an empty string it is a deletion.

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: johnywhy
Date: July 01, 2009 11:51PM

thanks, james. i was looking for that list!

disabling km native keystrokes is a handy workaround, but i use different sites that have different shortcuts. i'd have to disable ALL km shortcuts. of course not practical if i want to keep km keystrokes on other sites.

would be preferable for km to automatically give priority to site-specific keystrokes when they exist.



Edited 1 time(s). Last edit at 07/03/2009 01:44AM by johnywhy.

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: JamesD
Date: July 02, 2009 01:56AM

I suppose I would need to sign up on todist.com in order to test ideas. Does the CTRL+N just allow you to go to a next line when inputing in a text field?

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: kko
Date: July 02, 2009 03:47AM

Quote
johnywhy
CTRL+N, the newline keystroke on todoist.com...

Why not just ENTER like anywhere else? tongue sticking out smiley


Quote
johnywhy
...is just one example of a site on which custom keyboard shortcuts are over-ridden by k-meleon.

This problem does not happen with IE or Firefox.

That's because K-Meleon is The Browser You Control. grinning smiley

I don't get why custom website keyboard shortcuts should have priority over default application ones. Ctrl+N is a very good example. This is the default accel to open a new window in most browsers. Why should Ctrl+N do open a new window on almost any website, but do something else on todoist.com? That doesn't make any sense to me. Same applies to other accels and other websites. I mean, when websites would start to override default application accels, you would never know what a certain accel is doing - the outcome would depend on the website. Brave new Web 2.0! From my point of view, this is more a question of good web application design than a question of browser design...

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: johnywhy
Date: July 02, 2009 07:34PM

gmail is another site with custom keystrokes, which don't work on km, because they are overridden by km native shortcuts.

should a website be slave to the browser, or the reverse?

kko, sites lately are acting like apps. itunes and powerpoint shortcuts do different things, cuz they are different apps. i dont have a problem with that.

you're right that if every site uses different shortcuts, users wont know what those shortcuts are-- unless users read the help doc.



Edited 5 time(s). Last edit at 07/02/2009 08:30PM by johnywhy.

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: guenter
Date: July 02, 2009 07:48PM

If a site overrides default settings the site and the browser is buggy.

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: johnywhy
Date: July 02, 2009 07:58PM

gmail uses ctrl-n too. doesnt work on km.

gmail use standard formatting keystrokes. ctrl-i for italic does not work on km.

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: desga2
Date: July 03, 2009 12:04AM

Gmail can configure Ctrl+V to send you a virus, why must allow K-Meleon or any other browser to do this to Gmail?

Or some other bad site can setting Ctrl+C to shutdown the system (as Ctrl+Alt+Supr).

K-Meleon in Spanish



Edited 1 time(s). Last edit at 07/03/2009 12:06AM by desga2.

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: johnywhy
Date: July 03, 2009 01:24AM

theoretically, i suppose gmail might assign a keyboard shortcut to give my pc a virus, but i've never heard of this. i googled it and could not find anything like this.

it may exist on some creepy website out there, but that's the risk people take if they browse creepy websites.

but why would a creepy website go to the trouble of using a keyboard-shortcut to send you a virus? they use malicious javascript, downloads, email.

so, perhaps km should disable javascript, downloading, and email.

but that's why i have anti-virus protection on my computer.

km should enable users to do what they choose to do, and let them take the risks they choose to take. km is supposed to be the "browser i control". but by not supporting site keyboard shortcuts, km restricts what i can do, and makes itself less compatible with the web.

i just tested and confirmed that opera, ie, chrome, and firefox all support gmail keyboard shortcuts. they all take security seriously.

this is a km limitation.



Edited 3 time(s). Last edit at 07/03/2009 01:27AM by johnywhy.

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: johnywhy
Date: July 03, 2009 03:55AM

i thought this was a bug when i started this thread, but it's obviously an 'improvement request'. so it would be cool if the moderator wants to move this to the improvement request forum, if possible.

btw, i'm a huge fan of km, don't get me wrong. i want to see km poke a big dent in the other browsers.



Edited 1 time(s). Last edit at 07/03/2009 03:56AM by johnywhy.

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: JamesD
Date: July 06, 2009 02:51AM

@ johnywhy

I have a macro and file which attempt to show a method enable the accelerator key of a site while allowing a return to the default keys of KM. This is only a demo using two sites - todoist and gmail. It could be expanded for other sites by any user. There is an image for the button at http://img513.imageshack.us/gal.php?g=keystop.png
It needs to be changed to a bmp file for use and put into the Default folder under Skins.

KeyStop.kmm
#  K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)
#
# ---------- KeyStop.kmm
# Dependencies        : main.kmm KeyStopH.ini 
# Resources           : panorama image keystop.bmp in SKINS\DEFAULT 
# Preferences         : -
# Version             : 0.6  7/05/09 
# --------------------------------------------------------------------------------

KeyStop_RunCode{
# Lock the button
pluginmsg(toolbars, "EnableButton", "KeyStopBar,macros(KeyStop_RunCode), 0");
# check to see if current hostname($URL) is a section and has a count > zero
$_KeyStop_HostCnt = iniread(hostname($URL), "Count", $_KeyStop_Value, $_KeyStop_Path."\\KeyStopH.ini");
$_KeyStop_HostCnt > 0? &_KeyStop_RunCode2:&_KeyStop_RunStop;
}

_KeyStop_RunCode2{
$_KeyStop_bChecked = pluginmsgex(toolbars, "IsButtonChecked", "KeyStopBar,macros(KeyStop_RunCode)", INT);
# if checked is 1 then default accels are turned off
if ($_KeyStop_bChecked==1) {&_KeyStop_Restore;} else {&_KeyStop_Stop;}
}

_KeyStop_Stop{
$_KeyStop_cntr = 1; $_KeyStop_Host = hostname($URL); $_KeyStop_Off_String = "|";
while ( $_KeyStop_cntr <= $_KeyStop_HostCnt ) {
	$_KeyStop_Keys = iniread($_KeyStop_Host, $_KeyStop_cntr, $_KeyStop_Value, $_KeyStop_Path."\\KeyStopH.ini");
	## "macros(dummy)" used instead of "" - bug report 1134
	setaccel( "\"".$_KeyStop_Keys."\"" ,"macros(dummy)"); 
	$_KeyStop_Off_String = $_KeyStop_Keys . "|" . $_KeyStop_Off_String ;
	$_KeyStop_cntr = $_KeyStop_cntr + 1;
	}
# set bchecked equal to 1
pluginmsg(toolbars, "CheckButton", "KeyStopBar,macros(KeyStop_RunCode),1");	
# Unlock the button
pluginmsg(toolbars, "EnableButton", "KeyStopBar,macros(KeyStop_RunCode), 1");
}

_KeyStop_RunStop{ 
alert(hostname($URL) . "\n\n has no items in the list." , "WARNING", EXCLAIM);
# Unlock the button
pluginmsg(toolbars, "EnableButton", "KeyStopBar,macros(KeyStop_RunCode), 1");
} 

_KeyStop_Restore{
$_KeyStop_I = index($_KeyStop_Off_String,"|") ;
$_KeyStop_cntr = 0;
while ($_KeyStop_I > 1){
	$_KeyStop_IK = substr($_KeyStop_Off_String, 0,$_KeyStop_I );
	$_KeyStop_Off_String = substr($_KeyStop_Off_String, $_KeyStop_I + 1);
	$_KeyStop_I = index($_KeyStop_Off_String,"|") ;
	$_KeyStop_IK == "VK_ESCAPE" ? setaccel("VK_ESCAPE", ID_NAV_STOP) :0;
	$_KeyStop_IK == "CTRL VK_RETURN" ? setaccel("CTRL VK_RETURN", "macros(domComplete(0))") :0;
	$_KeyStop_IK == "CTRL B" ? setaccel("CTRL B", "bookmarks(edit)") :0;
	$_KeyStop_IK == "CTRL I" ? setaccel("CTRL I", ID_VIEW_PAGE_INFO) :0;
	$_KeyStop_IK == "CTRL U" ? setaccel("CTRL U", ID_VIEW_SOURCE) :0;
	$_KeyStop_IK == "CTRL H" ? setaccel("CTRL H", "history(View)") :0;
	$_KeyStop_IK == "CTRL N" ? setaccel("CTRL N", ID_NEW_BROWSER) :0;
	$_KeyStop_IK == "CTRL S" ? setaccel("CTRL S", ID_FILE_SAVE_AS) :0;
	# Add additional defaults here - duplicates not necessary
	}
# Set bchecked equal to 0
pluginmsg(toolbars, "CheckButton", "KeyStopBar,macros(KeyStop_RunCode),0");
# Unlock the button
pluginmsg(toolbars, "EnableButton", "KeyStopBar,macros(KeyStop_RunCode), 1");
}

_KeyStop_BuildBar{
$_KS_ToolbarName = "KeyStopBar" ;
$_KS_BSize = "16" ;
$_KS_LastItem = "" ;
$_KS_AddBarTag = $_KS_ToolbarName .",". $_KS_BSize .",". $_KS_BSize .",". $_KS_LastItem ; 
pluginmsg(toolbars, "AddToolbar", $_KS_AddBarTag);
$_KS_Command = "macros(KeyStop_RunCode)";
$_KS_ButtonName = "CloseOther" ;
$_KS_MenuName = "" ;
$_KS_tipText = "Disable/Enable local keys";
$_KS_ImageHot = "keystop.bmp[1]" ;  
$_KS_ImageCold = "keystop.bmp[0]" ; 
$_KS_ImageDead = "keystop.bmp[2]" ;  
## Create third parameter for pluginmsg
$_KS_AddButtonTag = $_KS_ToolbarName.",".$_KS_ButtonName.",".$_KS_Command.",".$_KS_MenuName.",".$_KS_tipText.",".$_KS_BSize.",".$_KS_BSize.",".$_KS_ImageHot.",".$_KS_ImageCold.",".$_KS_ImageDead.",".$_KS_LastItem ; 
pluginmsg(toolbars, "AddButton", $_KS_AddButtonTag);
}

_KeyStop_GetPath{
$__Data=readfile(getfolder(MacroFolder)."\\KeyStop.kmm");
$_KeyStop_Path=getfolder($__Data==""?UserMacroFolder:MacroFolder);
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - 
$OnSetup=$OnSetup."_KeyStop_BuildBar;_KeyStop_GetPath;";
$macroModules=$macroModules."KeyStop;";

KeyStopH.ini
[todoist.com]
Count=7
1=VK_ESCAPE
2=CTRL VK_RETURN
3=CTRL B
4=CTRL I
5=CTRL U
6=CTRL H
7=CTRL N
[mail.google.com]
Count=2
1=VK_ESCAPE
2=CTRL S


Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: disrupted
Date: July 06, 2009 11:39AM

james, i converted your toolbar image into bmp with transparency

download: http://kmeleon.5gigs.net/images/keystop.bmp

preview:

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: JamesD
Date: July 06, 2009 05:37PM

@ disrupted

Thanks, I don't know why imageshack changed it to png. I uploaded a bmp.

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: johnywhy
Date: July 08, 2009 01:07AM

wow, thanks JamesD.

i'm wondering if there would be a simpler way to simply disable all km shortcuts universally, without having to write a custom macro for each website.

i tried putting

CTRL I =

into accel.cfg, but it did not disable km's ctrl-i behavior.

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: JamesD
Date: July 08, 2009 02:53AM

There is a bug in the current KM version. The workaround is to set the keys equal to "macros(dummy)". This code is from KeyStop.kmm

	## "macros(dummy)" used instead of "" - bug report 1134
	setaccel( "\"".$_KeyStop_Keys."\"" ,"macros(dummy)");

You could, of course, disable all keys, but some of them you might need. All I have done is provide a model. You can change it any way you wish.

All you have to do to add another website is to add its hostname and the keys that conflict to the KeyStopH.ini file. KeyStop.kmm does not have to be changed.



Edited 1 time(s). Last edit at 07/08/2009 02:56AM by JamesD.

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: johnywhy
Date: July 09, 2009 01:07AM

can i use macros(dummy) in accel.cfg?

CTRL I = macros(dummy)

Re: K-Meleon Does Not Respect Keyboard Shortcuts Of Sites
Posted by: desga2
Date: July 09, 2009 03:36AM

Quote
johnywhy
can i use macros(dummy) in accel.cfg?

CTRL I = macros(dummy)

Yes, it's.

K-Meleon in Spanish

Simple Solution
Posted by: johnywhy
Date: July 15, 2009 11:46AM

i seem to have found a simpler way to simply disable all km shortcuts universally, without having to write a custom macro for each website.

just move (or delete) defaults\settings\accel.cfg

seems to enable keyboard shortcuts on all sites.

Re: Simple Solution
Posted by: desga2
Date: July 15, 2009 02:12PM

Yes, you can do it but you lost all default accelerators config.

K-Meleon in Spanish

Re: Simple Solution
Posted by: johnywhy
Date: July 20, 2009 01:38PM

yes, that was my goal. now all website accelerators work.

Re: Simple Solution
Posted by: TimG
Date: August 20, 2009 04:07AM

I agree that using website's keyboard shortcuts (as in Google Docs ctrl-B for bold) could be an improvement to the K-Meleon options. I will try the workarounds shown above for now.

Re: Simple Solution
Posted by: johnywhy
Date: September 16, 2009 12:07AM

TimG, unless you enjoy spending hours writing custom macros (which can be fun), the quickest easiest way is to edit or delete accel.cfg in
C:\Program Files\K-Meleon\defaults\settings
but, beware there's a duplicate in
C:\Users\YourName\AppData\Local\VirtualStore\Program Files\K-Meleon\defaults\settings
(on Windows Vista, maybe different on XP)
The first applies to all users on your pc, the other applies only to windows account YourName. If you don't delete the file in AppData, then it will override any changes you make to the file in C:\Program Files.

You may need to Show Hidden Files in your Windows Explorer (Tools Menu/Folder Options/View tab) to access the AppData folder.

I want all users on my pc to share the same km keyboard shortcuts, so i just deleted the user-specific file in AppData, and did my desired edits to the file in C:\Program Files.

Personally, i just removed the CTRL-B and a couple other keyboard shortcuts inside the file, because i wanted to keep most of the km's native shortcuts.



Edited 9 time(s). Last edit at 09/18/2009 02:50AM by johnywhy.

K-Meleon forum is powered by Phorum.