Giter VIP home page Giter VIP logo

Comments (4)

rsjaffe avatar rsjaffe commented on May 10, 2024

From @thegouger on August 19, 2015 4:29

I think this is something that the Lightroom devs would have to implement. Seems like this isn't supported for parameters changed from the plugin, but I'll look into it a bit more.

from midi2lr.

rsjaffe avatar rsjaffe commented on May 10, 2024

From @StefanKellerAC on August 19, 2015 20:11

I use keys with ahk as input, here are modifiers working:
http://paddy-for-lightroom.blogspot.de/2015/07/lightroom-sdk-opens-up-development.html?showComment=1439326199594#c6959137647137975108

from midi2lr.

rsjaffe avatar rsjaffe commented on May 10, 2024

From @alexlinno on August 30, 2015 14:26

I tried to simulate a 'ALT' keep press (windows specific). This was quickly done by adding a new 'ALT' mapping and before sending it in void LR_IPC_OUT::handleMidiCC check whether it was mapped to 'ALT'. if so a I simulated a ALT KEY press, and release if key was pressed.
However this work when pressing the MIDI button and then sliding a slider like whites/detail in LR. I do get the highlights/mask view. However when moving the e.g. whites slider the highlights are not shown. I.e. lightroom ignores keyboard input when a call is mode throught the API.
This might explain why it works through ahk, if the ahk script also simulated keypresses for e.g. the 'whites' slider movement.
code:
if (!CommandMap::getInstance().messageExistsInMap(cc) || CommandMap::getInstance().getCommandforMessage(cc) == 0)
return;
String test = LRCommandList::LRStringList[(int)CommandMap::getInstance().getCommandforMessage(cc)];
if (test == "ALT")
{
INPUT ip;
ip.type = INPUT_KEYBOARD;
ip.ki.wScan = 0; // hardware scan code for key
ip.ki.time = 0;
ip.ki.dwExtraInfo = 0;
ip.ki.wVk = VK_MENU; // virtual-key code for the "a" key
if (!m_bAltActive) // Press the "ALT" key
ip.ki.dwFlags = 0; // 0 for key press
else //Release the "ALT" key
ip.ki.dwFlags = KEYEVENTF_KEYUP; // KEYEVENTF_KEYUP for key release

    SendInput(1, &ip, sizeof(INPUT));
}
else
{
    _commandToSend = LRCommandList::LRStringList[(int)CommandMap::getInstance().getCommandforMessage(cc)];
    _valueToSend = value;
    handleAsyncUpdate();
}

from midi2lr.

rsjaffe avatar rsjaffe commented on May 10, 2024

See #31

from midi2lr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.