"Save selected text to variable selected_text" copies clipboard content instead of selection or does not work at all

do you use any special keyboard layout? BTT copies selected text using the keyboard command cmd+c - which might fail with some special layouts