Urban Terror Forums: copy paste address in console - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • This topic is locked

copy paste address in console Rate Topic: -----

#1 User is offline   gEnia Icon

  • Account: genia
  • Country:
  • Joined: 04-March 10
  • Posts: 12

Posted 18 June 2010 - 10:54 PM

Is it possible to paste the clipboard content in the urt console?
CTRL-V and midlle mouse button don't.

#2 User is offline   ObScUrE Icon

  •   head moderator   
    Co-Chief Community Moderator
  • Account: obscure
  • Country:
  • Joined: 28-February 10
  • Posts: 2,192

Posted 18 June 2010 - 11:07 PM

ctrl + v works but it's not possible to paste text with line breaks in console.

Quote

BenQ-XL2420T|Filco-Ninja-TKL-MXRed|Logitech-G403|AKG-K70201000010 01101100 01110101 01110100 01010010 01100001 01110101 00100100 01100011 01101000~The quieter you become, the more you are able to hear.~

#3 User is offline   gEnia Icon

  • Account: genia
  • Country:
  • Joined: 04-March 10
  • Posts: 12

Posted 19 June 2010 - 12:31 AM

View PostObScUrE, on 18 June 2010 - 11:07 PM, said:

ctrl + v works but it's not possible to paste text with line breaks in console.


Strange. I cannot even paste this: *175.233.322.112:21931* or this: *pippo*;
no EOL, no space.

Opensuse, KDE, standard or optimized urt binaries.

#4 User is offline   3spades Icon

  •   gameserver owner   
    Support Guy
  • Account: 3spades
  • Country:
  • Joined: 28-February 10
  • Posts: 389

Posted 20 June 2010 - 04:27 AM

Does Shift+Insert work?
urt.voxel.net :: Ruining your URT experience [2] weapons limited servers at a time.
Kevlar in CTF is like sex with a condom. Sure you get the general feel of things, but everyone would enjoy the game without it.

#5 User is offline   undead Icon

  • Account: undead
  • Joined: 06-June 10
  • Posts: 199

Posted 20 June 2010 - 05:50 PM

gEnia: What I do is use command line arguments like: ioquake3-bumpy.x86_64 +connect <ip>


There's no way ctrl-v or shift-insert works in Linux.

In code/client/cl_keys.c:


void Field_KeyDownEvent( field_t *edit, int key ) {
        int             len;

        // shift-insert is paste
        if ( ( ( key == K_INS ) || ( key == K_KP_INS ) ) && keys[K_SHIFT].down ) {
                Field_Paste( edit );
                return;
        }



and it's the same call for ctrl-v in cl_keys.c:


        if ( ch == 'v' - 'a' + 1 ) {    // ctrl-v is paste
                Field_Paste( edit );
                return;
        }



cl_keys has the definition of Field_Paste:


void Field_Paste( field_t *edit ) {
        char    *cbd;
        int             pasteLen, i;

        cbd = Sys_GetClipboardData();

        if ( !cbd ) {
                return;
        }

        // send as if typed, so insert / overstrike works properly
        pasteLen = strlen( cbd );
        for ( i = 0 ; i < pasteLen ; i++ ) {
                Field_CharEvent( edit, cbd[i] );
        }

        Z_Free( cbd );
}



However, in code/sys/sys_unix.c, it doesn't do anything for Sys_GetClipboardData:


char *Sys_GetClipboardData(void)
{
        return NULL;
}



If you look at code/sys/sys_win32.c, it has an implementation.


If you want to hack on it, look at xsel for an example of how selection works in X11. There's a primary, secondary and clipboard selection. The right way to handle it would be to add support in SDL for it. There's a proposal/prototype here:
http://playcontrol.n...dPrototype.html
http://www.assembla....w/SDL_Clipboard

This post has been edited by undead: 20 June 2010 - 06:03 PM


#6 User is offline   gEnia Icon

  • Account: genia
  • Country:
  • Joined: 04-March 10
  • Posts: 12

Posted 20 June 2010 - 07:25 PM

3spades said:

Does Shift+Insert work?

No it doesn't. :(

#7 User is offline   gEnia Icon

  • Account: genia
  • Country:
  • Joined: 04-March 10
  • Posts: 12

Posted 20 June 2010 - 07:29 PM

undead said:

gEnia: What I do is use command line arguments like: ioquake3-bumpy.x86_64 +connect <ip>

There's no way ctrl-v or shift-insert works in Linux.

If you want to hack on it, look at xsel for an example of how selection works in X11.



Thanks for the interesting reply and for a partially solution.

This post has been edited by gEnia: 20 June 2010 - 07:47 PM


#8 User is offline   randomut Icon

  • Account: randomut
  • Country:
  • Joined: 09-June 10
  • Posts: 16

Posted 07 July 2010 - 04:51 PM

you could always run urt from a terminal then alt+tab to minimize urt then paste whatever into the terminal, its the same as the game console

#9 User is offline   ado Icon

  • Account: ado
  • Country:
  • Joined: 16-June 10
  • Posts: 58

Posted 07 July 2010 - 06:20 PM

^ nice, didnt know i could do that.
with terminal, you can right click -> paste IPs that way

#10 User is offline   gEnia Icon

  • Account: genia
  • Country:
  • Joined: 04-March 10
  • Posts: 12

Posted 08 July 2010 - 03:26 PM

View Postrandomut, on 07 July 2010 - 04:51 PM, said:

you could always run urt from a terminal then alt+tab to minimize urt then paste whatever into the terminal, its the same as the game console



N i c e O n e


Terminal rulez :P

But it works only with standard binaries :(

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2019 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942