Loheide-eu-mitarbeiterplatt.../vendor/laravel/prompts/src/Key.php
Friederich Loheide 9c0f8de791
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m14s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 1m12s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m7s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m19s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m32s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m22s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 1m32s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m35s
CI / Build-Artefakte aktuell (pull_request) Failing after 1m7s
Phase 0: Fundament für Inhaus
- Laravel 13 mit Filament 5 (Admin), Inertia 3 + Vue 3 + Vuetify 4 (Material 3)
- Anmeldung über Fortify (Login, Passwort vergessen/ändern), keine Selbstregistrierung
- Profil mit Profilbild (WebP in festen Größen), Personenseiten, Header mit Avatar-Menü
- Material-3-Farbschema aus der Primärfarbe, hell/dunkel/System pro Person
- Basis-Branding (Portalname, Logo, Primärfarbe) im Admin unter „Erscheinungsbild“
- Benutzerverwaltung im Admin, Zugang vorläufig über is_admin
- vendor/ (ohne Dev-Pakete) und Frontend-Build mitversioniert, Dev-Pakete in vendor-dev/
- PHPUnit-Tests gegen MySQL/MariaDB, Forgejo-CI-Matrix, Docker-Entwicklungsumgebung
- VERSION, CHANGELOG.md und CONTRIBUTING.md mit Release-Ablauf

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 20:35:30 +00:00

118 lines
1.8 KiB
PHP

<?php
namespace Laravel\Prompts;
class Key
{
const UP = "\e[A";
const SHIFT_UP = "\e[1;2A";
const PAGE_UP = "\e[5~";
const DOWN = "\e[B";
const SHIFT_DOWN = "\e[1;2B";
const PAGE_DOWN = "\e[6~";
const RIGHT = "\e[C";
const LEFT = "\e[D";
const UP_ARROW = "\eOA";
const DOWN_ARROW = "\eOB";
const RIGHT_ARROW = "\eOC";
const LEFT_ARROW = "\eOD";
const ESCAPE = "\e";
const DELETE = "\e[3~";
const BACKSPACE = "\177";
const ENTER = "\n";
const SPACE = ' ';
const TAB = "\t";
const SHIFT_TAB = "\e[Z";
const HOME = ["\e[1~", "\eOH", "\e[H", "\e[7~"];
const END = ["\e[4~", "\eOF", "\e[F", "\e[8~"];
/**
* Cancel/SIGINT
*/
const CTRL_C = "\x03";
/**
* Previous/Up
*/
const CTRL_P = "\x10";
/**
* Next/Down
*/
const CTRL_N = "\x0E";
/**
* Forward/Right
*/
const CTRL_F = "\x06";
/**
* Back/Left
*/
const CTRL_B = "\x02";
/**
* Backspace
*/
const CTRL_H = "\x08";
/**
* Home
*/
const CTRL_A = "\x01";
/**
* EOF
*/
const CTRL_D = "\x04";
/**
* End
*/
const CTRL_E = "\x05";
/**
* Negative affirmation
*/
const CTRL_U = "\x15";
const OPTION_BACKSPACE = "\e\177";
/**
* Checks for the constant values for the given match and returns the match
*
* @param array<string|array<string>> $keys
*/
public static function oneOf(array $keys, string $match): ?string
{
foreach ($keys as $key) {
if (is_array($key) && static::oneOf($key, $match) !== null) {
return $match;
} elseif ($key === $match) {
return $match;
}
}
return null;
}
}