What is input key K_SELECT?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
User avatar
Posts: 36
Joined: Fri Jan 31, 2020 10:08 pm
Projects: Spirit Link
Tumblr: hsandt
Deviantart: hsandt
Github: hsandt
itch: komehara

What is input key K_SELECT?

#1 Post by komehara »

I found K_SELECT among the mappings of "dismiss" in https://www.renpy.org/doc/html/keymap.html but I could not find any information on it.

It doesn't appear in Pygame inputs: https://www.pygame.org/docs/ref/key.html

https://wiki.libsdl.org/SDL2/SDL_Keycode has some SDLK_SELECT but I still don't know what it is. The key that opens the contextual menu button where the mouse is? Why would that work like Space or Enter? Some accessibility key that simulates the mouse click where the mouse is? How does it differ from mouseup_1?

I'm adding custom bindings to dismiss_unfocused in the context of scrollable NVL text box that unfortunately captures focus and prevents advance on Space (see https://github.com/renpy/renpy/issues/5090), and I need to be sure I don't forget any key.

User avatar
Posts: 109
Joined: Wed Sep 29, 2021 4:08 am

Re: What is input key K_SELECT?

#2 Post by plastiekk »

komehara wrote: Fri Dec 01, 2023 10:50 am I found K_SELECT among the mappings of "dismiss" in https://www.renpy.org/doc/html/keymap.html but I could
This refers to the "Select" button on a gamepad, or so i guess. If you scroll a bit down you'll see:

Code: Select all

# Button.
    button_ignore = [ 'mousedown_1' ],
    button_select = [ 'K_RETURN', 'K_KP_ENTER', 'K_SELECT', 'mouseup_1',  ]...
and should do the same as the return key or left mousebutton.
Why on earth did I put the bread in the fridge?

User avatar
Ren'Py Creator
Posts: 16082
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY

Re: What is input key K_SELECT?

#3 Post by PyTom »

I don't think so - the gamepad is handled different. Probably some obscure keyboard somewhere has a SELECT key.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Lemma-Class Veteran
Posts: 2358
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384

Re: What is input key K_SELECT?

#4 Post by Ocelot »

I beleve this is an artifact of old terminals, where it was responsible for switching from input mode to a screen select mode, so you could select and copy some output, for example. Modern keyboards will not have those buttons, but they are still in the list of virtual keys and are still usable like other legacy keys.

Here is a keyboard containing Select (or, rather, CursrSel) key:
https://upload.wikimedia.org/wikipedia/ ... yboard.jpg
You can also see here F13-F24 keys which are also legacy keys which are in the list of keys, but do not exist on modern keyboards.
< < insert Rick Cook quote here > >

Post Reply

Who is online

Users browsing this forum: No registered users