General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
newbie question: new layer by ALT+Enter
Posted by: agatha
Date: April 17, 2008 05:21PM

How do i achiev tha to open the website of an typed url in a new layer by pressing ALT + ENTER (the firefox behavior)? TIA

Options: ReplyQuote
Re: newbie question: new layer by ALT+Enter
Posted by: desga2
Date: April 17, 2008 06:31PM

You not need Alt+Enter to do this:
Go to Edit -> Advanced Preferences (F2) -> Browsing section -> General tab;
Select Open: "Typed URL" in combo box and check "In new layer" and/or "In background" if you like it.

If you like it with a macro you can create a new macro file named 'AltEnter.kmm' (plain text file with notepad) for example, in your Macros profile subfolder (Edit -> Configuration -> Macros) and paste this code;

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- Open URL bar in new layer ----------------------------------------
#
# Dependencies	: main.kmm
# Resources	: -
# Preferences	: -
#
# -----------------------------------------------------------------------------

AltEnter{
$OpenURL = $URLBAR;
&OpenURL_InNew;
# To open in background:
#&OpenURL_InBg;
}

# ----- PRIVATE

_AltEnter_accel{
setaccel(ALT VK_RETURN,"macros(AltEnter)");
}

$OnInit=$OnInit."_AltEnter_accel;";

# -----------------------------------------------------------------------------
$macroModules=$macroModules."AltEnter;";

Restart K-Meleon to changes take effect.

K-Meleon in Spanish



Edited 1 time(s). Last edit at 04/17/2008 07:14PM by desga2.

Options: ReplyQuote
Re: newbie question: new layer by ALT+Enter
Posted by: agatha
Date: April 18, 2008 04:13AM

the macro works perfect! Thank you...

Options: ReplyQuote
Re: newbie question: new layer by ALT+Enter
Posted by: agatha
Date: April 26, 2008 08:00AM

Could i archive that i could also type in a search string in the adress field and hitting ALT+Enter to open the search results in a new layer?

example:
type in "searchstring", hitting ALT+Enter, a new layer opens with the search results of the configured searchenige.

TIA

Options: ReplyQuote
Re: newbie question: new layer by ALT+Enter
Posted by: Fred
Date: April 26, 2008 04:30PM

This should be possible, but with an other key combination,
as you use already ALT + ENTER for the first macro.
I would use ALT + BACKSPACE now.

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- Open URL bar in new layer ----------------------------------------
#
# Dependencies	: main.kmm
# Resources	: -
# Preferences	: -
#
# -----------------------------------------------------------------------------
AltBackspace{
$_Search_EngineURL==""?$_Search_EngineURL=getpref(STRING,$_Search_pref_DefaultURL):0;
$sdef =$_Search_EngineURL;
 pluginmsg(layers, "OpenURL", $sdef . $URLBAR) ;
}

# ----- PRIVATE

_AltBackspace_accel{
setaccel(ALT  VK_BACK,"macros(AltBackspace)");
}

$OnInit=$OnInit."_AltBackspace_accel;";

# -----------------------------------------------------------------------------
$macroModules=$macroModules."AltBackspace;";

Copy and paste to notepad and save to the folder "macros"
as AltBackspace.kmm (not as .txt ).
Hope that it works for you.

Fred

Options: ReplyQuote
Re: newbie question: new layer by ALT+Enter
Posted by: Fred
Date: April 26, 2008 04:36PM

P.S.:
Forgot to correct the title.
Replace if you want:

---------- Open URL bar in new layer --------------------------------------

with:

---------- Open URL bar keyword search in new layer-------------------------

Has nothing to do with the macro functionality.

Fred

Options: ReplyQuote
Re: newbie question: new layer by ALT+Enter
Posted by: guenter
Date: April 26, 2008 05:05PM

Do not forget to put these macros examples into Macro library in Wiki smiling smiley
Many greetings to to all posters from DE, ES and CH from Hanover - guenter

p. s. Fred, du hast Mail wegen K-M auf CD.

Options: ReplyQuote
Re: newbie question: new layer by ALT+Enter
Posted by: Fred
Date: April 26, 2008 05:55PM

@ Guenter
Mail war im Spamordner.
Vielleicht vorherige geloescht.
Habe Dir Mail geschickt.
Fred

Options: ReplyQuote
Re: newbie question: new layer by ALT+Enter
Posted by: batifol
Date: April 28, 2008 01:04PM

@Fred

To use your great macro with KM1.5beta I have to replace this:

_AltBackspace_accel{
setaccel(ALT VK_BACK,"macros(AltBackspace)");
}


With

_AltBackspace_accel{
setaccel("ALT VK_BACK","macros(AltBackspace)");
}

GC

Options: ReplyQuote
Re: newbie question: new layer by ALT+Enter
Posted by: desga2
Date: April 28, 2008 03:22PM

@ batifol:

Yes, this is because in 1.5 macro sentences are more strict and is needed double quotes (" ") in all parameters.

K-Meleon in Spanish

Options: ReplyQuote


K-Meleon forum is powered by Phorum.