Option to Open a URL / Search Results in a New Tab from the Address Bar with "Enter"
-
@shifte said in Option to Open a URL / Search Results in a New Tab from the Address Bar with "Enter":
Windows only.
AutoHotkey Settings.Press Enter for 0.2 seconds to open in a new tab.
Enter::
KeyWait,Enter, T1
if (ErrorLevel){
Send, {LShift Down}{Enter}{LShift Up}
Return
Sleep, 200
Return
}
Send,{Enter}
ReturnIf you don't use the IME, you may have no problem doing this.
Enter::
Send, {LShift Down}{Enter}{LShift Up}
ReturnDa ich ein normaler Nutzer und 77 Jahre alt bin würde ich sehr gerne wissen wie ich das anwenden kann. Eine detaillierte Anleitung wäre sehr hilfreich. Danke im Voraus.
-
@rven
Hello.
All you need to use is "Edit This Script" and "Reload "Edit this Script" in AutoHotKey.
↓Please paste this.#IfWinActive ahk_class Chrome_WidgetWin_1
Enter::
KeyWait,Enter, T1
if (ErrorLevel){
Send, {LShift Down}{Enter}{LShift Up}{LShift Up}
Return
Sleep, 200
Return
}
Send,{Enter}
ReturnSorry, not English UI.
-
If settings : shift+Enter
Send、{LShift Down} {Enter} {LShift Up}If settings: Alt+Enter
Send, !{Enter} -
Hallo,
nach diversen Experimenten hat es geklappt.
Mein Script sieht jetzt so aus:#IfWinActive ahk_class Chrome_WidgetWin_1 Enter:: Send, !{Enter} Return NumpadEnter:: Send, !{NumpadEnter} Return
Es ist aber noch nicht das Optimale:
- Das wirkt sich auch im Edge ungewollt aus!
- Ein einfacher Mausklick auf ein Suchergebnis öffnet aber trotzdem im gleichen Tab.
-
@Gwen-Dragon
Sorry, I'll be careful.1:
#IfWinActive ahk_class Chrome_WidgetWin_1
↓ change
#IfWinActive ahk_exe vivaldi.exe
2:
I couldn't reproduce it.
Maybe, alt key is not up?Please try this.
#IfWinActive ahk_exe vivaldi.exe Enter:: KeyWait,Enter, T1 if (ErrorLevel){ Send, !{Enter} Send, {Alt Up} Return Sleep, 200 Return } Send,{Enter} Return {NumpadEnter}:: Enter:: KeyWait,Enter, T1 if (ErrorLevel){ Send, !{Enter} Send, {Alt Up} Return Sleep, 200 Return } Send,{Enter} Return
↓ or your style/
#IfWinActive ahk_exe vivaldi.exe Enter:: Send, !{Enter} Send, {Alt Up} Return NumpadEnter:: Send, !{NumpadEnter} Send, {Alt Up} Return
-
I made a mistake on the bottom half of the top.
↓fixed.#IfWinActive ahk_exe vivaldi.exe Enter:: KeyWait,Enter, T1 if (ErrorLevel){ Send, !{Enter} Send, {Alt Up} Return Sleep, 200 Return } Send,{Enter} Return NumpadEnter:: KeyWait,NumpadEnter, T1 if (ErrorLevel){ Send, !{NumpadEnter} Send, {Alt Up} Return Sleep, 200 Return } Send,{NumpadEnter} Return
-
@shifte said in Option to Open a URL / Search Results in a New Tab from the Address Bar with "Enter":
↓ or your style/
#IfWinActive ahk_exe vivaldi.exe Enter:: Send, !{Enter} Send, {Alt Up} Return
Many thanks, finally a working solution!!
-
But now there's the problem, when I push "Enter" in a search box, it's not recognized...
-
@dany87
It's likely to cause problems, that's why I posted this.
This means as follows.
If Hold down over 0.2 seconds, send Alt+Enter. / If less than 0.2 seconds, send Enter.@shifte said in Option to Open a URL / Search Results in a New Tab from the Address Bar with "Enter":
#IfWinActive ahk_exe vivaldi.exe Enter:: KeyWait,Enter, T1 if (ErrorLevel){ Send, !{Enter} Send, {Alt Up} Return Sleep, 200 Return } Send,{Enter} Return
-
yes, this is the feature I came here to report, I really want this, I've wanted this in all the browsers. F* keys aren't really a great thing they're harder to reach on the keyboard and on many modern keyboards you have to press another modifier like the fn key to use them over hardware controls.
-
@Pesala said in Option to Open a URL / Search Results in a New Tab from the Address Bar with "Enter":
It sure beats me why they cannot find time to add a checkbox to settings.
Obviously there's a little more to it, plus the testing that may be involved as Bonetone mentioned. But in a nutshell it is essentially copy/paste the code to add an extra checkbox in Settings. And copy/paste the code that opens a tab using Shift/Ctrl+Enter, and remove the references to the modifier key.
Saying copy/paste may seem like oversimplifying it, but i fail to see how it's anything less that that. The code is literally right there, they just need to remove the reference to the modifier.
@shifte said in Option to Open a URL / Search Results in a New Tab from the Address Bar with "Enter":
If Hold down over 0.2 seconds, send Alt+Enter. / If less than 0.2 seconds, send Enter.
This is an elegant solution, but still relies on thinking about pressing or holding the Enter key.
While i'm getting used to using a modifier key, i still don't like it, and there's still been plenty of times i've screwed up leading to pages loading in the same tab.
@7twenty said in Option to Open a URL / Search Results in a New Tab from the Address Bar with "Enter":
I'm still curious about the above? No responses yet...
Still no answer to this... interesting. Could it be that there's no logical reasoning behind it.
-
Hi, apologies if I'm on the wrong track with this reply. I've just installed vivaldi to try it out against my waterfox and firefox alternatives( one of which has a bad memory leak I feel ). So far it feels good and I like the interface but I found I could not click a search result and have it open in a new tab. I searched this forum and found similar requests. The tick box "open search in new tab" is useful in keeping search results safe in a separate tabbed window but I also use duckduckgo as my search engines in both search boxes. In the settings you can just click "open search result in new tab", other engines may offer similar. This is useful as the combination allows an independent tab for the search results and any clicked search result links will open the relevant page in a new tab, and as many tabs as are requested. This works well for myself and may be useful to others, I prefer this to memorising keystroke combinations etc. Now I have a similar setup to waterfox etc with other extra features that are a bonus, it's nice so far!
-
@rgcon0809 Полностью согласен! В Maxthon эта функция реализована. Просто она есть!
Нет других браузеров с такой функцией.
А это ОЧЕНЬ удобно! -
Ich nutze den Slimjet Browser. Der hat diese Funktion standardmäßig.
-
Many thanks to Shifte. I havn't recognized this could be done by Autohotkey. I wrote another script for this issue and don't need to press Enter for more than 0.2s. Please use Window Spy in Autohotkey to get the values you may need to modify the code.
/* What we usually do is to click in the address bar/search bar, or press F8, then input address/keywords and hit enter. This script detect left click and F8, then replaces Enter and numpad Enter with Alt+Enter when nessecary. My Vivaldi looks like default view of Chrome or Firefox. If yours does not, you may need to change the creteria accordingly. */ #Persistent #SingleInstance force #NoEnv SetWorkingDir %A_ScriptDir% DetectHiddenWindows off /* Determine if left click happens in the address bar or search bar. Modify the creteria accroding to your own browser configurations. My creteria: 1. Mouse click in the right height (relative to Vivaldi windows) Y-coordinate between 45 and 67 works for me. Change the values according to your situation. 2. Cursor type is IBeam 3. Not in the New Tab If the title is not "New Tab", the script may not work. For example, in private windows. But you could modify the script to make it work. 4. Not inputing with an IME other than default English. Change "SoPY_Comp" into the class name of your IME. */ OBflag:=0 ;OB for omnibox ~LButton:: MouseGetPos,mX,mY,wID WinGet,wName,ProcessName,ahk_id %wID% If (wName="vivaldi.exe") { Send, {NumpadClear} MouseGetPos,mX,mY,wID WinGetTitle,wTitle,ahk_id %wID% If (mY>45 and mY<67 and A_Cursor="IBeam" and wTitle!="New Tab - Vivaldi") OBflag:=1 Else OBflag:=0 } Else OBflag:=0 return #IfWinActive, ahk_exe vivaldi.exe Enter:: NumpadEnter:: IfWinNotExist, ahk_class SoPY_Comp { If OBflag=1 { Send, !{Enter} OBflag:=0 } Else { Send, {Enter} OBflag:=0 } } else { Send, {Enter} } return ~F8:: OBflag:=1 return
@shifte said in Option to Open a URL / Search Results in a New Tab from the Address Bar with "Enter":
I made a mistake on the bottom half of the top.
↓fixed.#IfWinActive ahk_exe vivaldi.exe Enter:: KeyWait,Enter, T1 if (ErrorLevel){ Send, !{Enter} Send, {Alt Up} Return Sleep, 200 Return } Send,{Enter} Return NumpadEnter:: KeyWait,NumpadEnter, T1 if (ErrorLevel){ Send, !{NumpadEnter} Send, {Alt Up} Return Sleep, 200 Return } Send,{NumpadEnter} Return
-
@xieteng thank you for sharing ! this works great when the browser is in fullscreen, and this is already a major improvement in my case.
I still hope for a native solution from the devs though... -
@cannibalox, you're welcome. Happy to know that my script could help.
You said it works in fullscreen, did it work in window mode? If not, you could change the values in "mY>45 and mY<67" to solve the problem. I do not use Vivaldi in fullscreen and the script works fine. Or you can try F8 to locate the address bar.
I agree that a native solution would be the best, but I haven't seen any progress on the issue for years. T_T
-
Oopsy!
I was wrong.
Write as follows.Enter:: KeyWait,Enter, T0.2 if (ErrorLevel){ Send, {LShift Down}{Enter}{LShift Up}{LShift Up} } else{ Send,{Enter} } Return
-
So still no option to open new tab from address bar with simple "Enter" key?
What an epic fail. -
Abandon all hope ye who thinks this will be implemented. I just use Ctrl+T first to open new tab. I don't think devs even visit this forum, only ambassadors who forward things to devs.
@Pesala maybe you could do something about getting this implemented? We've been waiting few years....