Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] LXTerminal acts odd w/key combos like Shift-Ctrl-C
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
PQPGuy
n00b
n00b


Joined: 04 Sep 2017
Posts: 31

PostPosted: Tue Sep 12, 2017 10:11 am    Post subject: [SOLVED] LXTerminal acts odd w/key combos like Shift-Ctrl-C Reply with quote

I am using LXDE + Openbox, and LXTerminal acts strangely. When I open a tab via Ctrl-T, the new tab shows the initial command line prompt as

Quote:
^Tuser@gentoopc ~ $

Why the ^T? Likewise, pressing Shift-Ctrl-C to copy something acts as if I pressed Ctrl-C. Ctrl-V (paste) also displays some weird characters. Is there any way to fix this? There should be a way to intercept these key combos, but I cannot see anything relevant in Preferences.

Many thanks.

CORRECTION: I open a new tab with Shift-Ctrl-T rather than Ctrl-T. I copy-paste with Shift-Ctrl-C Shift-Ctrl-V rather than Ctrl-C Ctrl-V. My mistake.


Last edited by PQPGuy on Tue Sep 12, 2017 4:12 pm; edited 2 times in total
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1760
Location: United Kingdom

PostPosted: Tue Sep 12, 2017 10:35 am    Post subject: Reply with quote

According to LXTerminal's pull-down menu entry 'File', the shortcut for 'New Tab' is Shift+Ctrl+T, not Ctrl+T. Shift+Ctrl+T works in my case (LXTerminal 0.2.0).

To copy/paste in LXDE+Openbox using Ctrl+Shift+C/Ctrl+Shift+V, add the following two key bindings in the keyboard section of ~/.config/openbox/lxde-rc.xml:

Code:
<keyboard>
...
<!-- Ctrl+Shift+c Copy X selection to clipboard -->

    <keybind key="C-S-c">
      <action name="Execute">
        <command>sh -c 'xsel -o | xsel --clipboard'</command>
      </action>
    </keybind>

<!-- Ctrl+Shift+v Paste clipboard contents -->

    <keybind key="C-S-v">
      <action name="Execute">
        <command>sh -c 'xsel -o | xvkbd -xsendevent -file -'</command>
      </action>
    </keybind>
...
</keyboard>

If not already installed, you'll need to install x11-misc/xsel and x11-misc/xvkbd.

If you prefer Ctrl+V instead of Ctrl+Shift+V, change the keybind key accordingly in lxde-rc.xml.

See also the recent thread Copy text from terminal outputs ^C.
_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog


Last edited by Fitzcarraldo on Tue Sep 12, 2017 11:04 am; edited 2 times in total
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2660

PostPosted: Tue Sep 12, 2017 10:40 am    Post subject: Reply with quote

lxterminal as available in the Gentoo ebuild repository is horriibly outdated, see https://bugs.gentoo.org/607838
Back to top
View user's profile Send private message
PQPGuy
n00b
n00b


Joined: 04 Sep 2017
Posts: 31

PostPosted: Tue Sep 12, 2017 11:10 am    Post subject: Reply with quote

Thanks all. Fitzcarraldo, your suggestions seem to work. But what about Ctrl-T for opening a new tab?

Many thanks.
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1760
Location: United Kingdom

PostPosted: Tue Sep 12, 2017 11:21 am    Post subject: Reply with quote

PQPGuy wrote:
But what about Ctrl-T for opening a new tab?

According to LXTerminal's pull-down menu entry 'File', the shortcut for 'New Tab' is Shift+Ctrl+T, not Ctrl+T. Shift+Ctrl+T works in my case (LXTerminal 0.2.0).
_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
PQPGuy
n00b
n00b


Joined: 04 Sep 2017
Posts: 31

PostPosted: Tue Sep 12, 2017 11:28 am    Post subject: Reply with quote

Fitzcarraldo, sorry, you are correct. It's Shift+Ctrl+T in my case, too. I messed up. But I still get this ^T after opening a new tab via Shift+Ctrl+T. So, the previous question remains: how can I get rid of the ^T? (Copy-pasting works fine now).

Many thanks.
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1760
Location: United Kingdom

PostPosted: Tue Sep 12, 2017 12:36 pm    Post subject: Reply with quote

PQPGuy wrote:
Fitzcarraldo, sorry, you are correct. It's Shift+Ctrl+T in my case, too. I messed up. But I still get this ^T after opening a new tab via Shift+Ctrl+T. So, the previous question remains: how can I get rid of the ^T? (Copy-pasting works fine now).

Which version of LXTerminal are you using? If it's not at least 0.2.0, what you're experiencing is probably a bug in lxterminal-0.1.11 (see LXTerminal shortcuts work but also output to console).
_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
PQPGuy
n00b
n00b


Joined: 04 Sep 2017
Posts: 31

PostPosted: Tue Sep 12, 2017 12:46 pm    Post subject: Reply with quote

Fitzcarraldo, you are right, once again. I run LXTerminal v. 0.1.11. So, let's upgrade to v. 0.2.0-r1 (which is currently unstable) and see what happens.

UPDATE: upgrading made the problem go away! The new version allows the keybindings (like copy, paste, etc.) to be set through Preferences.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum