Some DEBUGGING was done…
import wixLocation from 'wix-location';
$w.onReady(()=>{
let myValue;
$w('#input1').onChange(()=>{
myValue = $w('#input1').value;
console.log("My-Value: ", myValue);
});
//About the ENTER-KEY.........
$w('#input1').onKeyPress(()=>{
if (event.key === "Enter") {
console.log('ENTER-KEY was pressed!');
wixLocation.to("https://"+myValue);
}
else {console.log('Another KEY was pressed!');}
});
$w('#btnEnterCode').onClick(()=>{
wixLocation.to("https://"+myValue);
});
});
Type in… —> www.google.com and test it.