Autor Wątek: Klawiatura numeryczna jako ICP  (Przeczytany 1933 razy)

0 użytkowników i 1 Gość przegląda ten wątek.

kwadrat

  • Gość
Klawiatura numeryczna jako ICP
« dnia: Grudnia 23, 2020, 20:09:58 »
Potrzebujemy:

1. Pobieramy Interception https://github.com/oblitum/Interception/releases
Instalujemy zgodnie z dokumentacją jako administrator i restartujemy komputer.

2. Pobieramy i instalujemy AutoHotKey
Po instalacji tworzymy plik z rozszerzeniem .ahk Poniżej przykładowy który zmienia działanie przycisków multimedialnych. Nie wykorzystałem go do mapowania całej klawiatury ponieważ chciałem mieć jak najwięcej klawiszy dostępnych jako kontroler gier (np. do DCS) oraz z powodu tego, że te skrypty działają zarówno na klawiaturę numeryczną jak i na główną klawiaturę.

Launch_Mail::F3
Launch_App2::Numpad4
Browser_Search::Numpad7

Nazwy przycisków można sprawdzić w dokumentacji:
https://www.autohotkey.com/docs/KeyList.htm
Działanie możemy przetestować na tej stronie:
https://keycode.info/

Uruchamiamy skrypt poprzez dwukrotnie kliknięcie na naszym pliku ahk. Przy zegarku pojawi się ikona AutoHotKey.

3. Instalujemy vJoy. Następnie uruchamiamy „Configure vJoy” tak tworzymy kontroler z samymi guzikami.
Robimy restart i upewniamy się, że vJoy Device jest w kontrolerach gier.



4. Pobieramy i rozpakowujemy UCR.

Edytujemy plik " UCR_v0.9.0\Providers\Core_Interception\Settings.xml" co nam pozwoli na wyłączanie przycisków dla tej klawiatury.

<Name>BlockingEnabled</Name>
    <Value>True</Value>
  </Setting>

Uruchamiamy UCR.exe. Dodajemy nowy profil gdzie urządzeniem wejściowym jest nasza klawiatura numeryczna a wyjściowym wcześniej utworzony joystick vJoy.



Dodajemy kolejne przyciski. Ja wybierałem opcję Button to Button.
Dla tych które chcemy zaznaczamy opcję blokowania w systemie.



Konfiguracja zapisywania jest w pliku context.xml. Tutaj mój przykładowy plik:

<?xml version="1.0" encoding="utf-8"?>
<Context xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Profiles>
    <Profile Title="falcon" Guid="f4adead4-1ccb-4929-8d7c-b1ce3927d2f8">
      <ChildProfiles />
      <Mappings>
        <Mapping Title="T_ILS">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="14" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="0" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="COM1">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="13" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="1" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="ALOW">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="54" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="2" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="CRUS">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="308" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="3" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="FIX">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="68" KeySubValue="0" Block="true" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="4" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="COM2">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="73" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="5" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="3">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="72" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="6" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="TIME">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="71" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="7" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="ACAL">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="70" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="8" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="AA">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="77" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="9" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="RCL">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="76" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="10" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="ENTER">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="75" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="11" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="MSEL">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="74" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="12" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="AG">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="283" KeySubValue="0" Block="true" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="13" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="LIST">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="80" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="14" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="WARN">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="79" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="15" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="RTN">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="78" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="16" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="UP">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="82" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="17" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="DOWN">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="56" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="18" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
        <Mapping Title="SEQ">
          <DeviceBindings>
            <DeviceBinding IsBound="true" DeviceConfigurationGuid="c48b501b-57dd-4762-bb99-b6d60b108576" KeyType="1" KeyValue="81" KeySubValue="0" />
          </DeviceBindings>
          <Plugins>
            <Plugin xsi:type="ButtonToButton">
              <Outputs>
                <DeviceBinding IsBound="true" DeviceConfigurationGuid="a95623df-4228-44f4-8c5a-84bfbf87f7d0" KeyType="1" KeyValue="19" KeySubValue="0" />
              </Outputs>
              <Filters />
              <Invert>false</Invert>
            </Plugin>
          </Plugins>
        </Mapping>
      </Mappings>
      <InputDeviceConfigurations>
        <DeviceConfiguration Guid="c48b501b-57dd-4762-bb99-b6d60b108576">
          <Device Title="K: SEM HCT Keyboard" ProviderName="Core_Interception" DeviceHandle="Keyboard\HID\VID_1C4F&amp;PID_0002&amp;REV_0110&amp;MI_00" DeviceNumber="0" />
          <ShadowDevices />
        </DeviceConfiguration>
      </InputDeviceConfigurations>
      <OutputDeviceConfigurations>
        <DeviceConfiguration Guid="a95623df-4228-44f4-8c5a-84bfbf87f7d0">
          <Device Title="vJoy Stick 1" ProviderName="Core_vJoyInterfaceWrap" DeviceHandle="0" DeviceNumber="0" />
          <ShadowDevices />
        </DeviceConfiguration>
      </OutputDeviceConfigurations>
    </Profile>
  </Profiles>
</Context>

Kiedy mamy już sporo wpisów to w aplikacji UCR należy powoli przewijać okno ponieważ czasami się zawiesza. Jak już wszystko ustawimy to nie będzie to powodować problemów.

Zapisujemy i klikamy opcję play. Tym sposobem mamy większość przycisków dostępnych bez problemu poprzez kontroler gier, a pozostałe z drobną trudnością poprzez AutoHotKey.

Zanim zaczniemy grę musimy zawsze uruchomić skrypt AutoHotKey (chyba, że dodamy go do autostartu) oraz UCR i kliknąć Play.

Są na pewno lepsze rozwiązania jak np. Logitech G13 ale nie udało mi się go znaleźć w dobrej cenie albo X-Keys .
To jest mało inwazyjne i dość wygodne do sprawdzenia czy jest to nam potrzebne.



sunrrrise

  • Gość
Odp: Klawiatura numeryczna jako ICP
« Odpowiedź #1 dnia: Grudnia 23, 2020, 20:26:06 »
Bardzo fajny pomysł, ale nie rozumiem po co te dodatkowe opragromowanie? Sam używałem dodatkowej klawiatury numerycznej jako ICP i to w czasach sprzed Alternative Launcher, da rade to ogarnąć na poziomie samego BMSa :) A z Alternative Launcher to już w ogóle powinien być klik-kiik i wio :)