Jump to content

Foot Pedals / Udemy


Recommended Posts

Hi,

 

I'm new -forgive me...

 

I really like Alfred 🙂

 

I have a question.  Can anyone help me figure out the best way to solve a problem.  I would like to control Udemy videos in Chrome (or any other browser I guess) with a 3 key foot pedal (play, back 10 seconds, forward 10 seconds) whilst doing what the Udemy course is instructing me to do in another window or windows (usually an editor and a perhaps a program window). 

I was thinking that if I could use Alfred to respond to the foot pedal to control the Udemy content then I could bravely battle on with the keyboard with the rest.

 

Is this even possible?  Am I even thinking about this the right way?

 

If this has been dealt with under search terms that I didn't think of I'm really sorry.

 

Thanks for tuning in...

 

Chris

Link to comment

There are two separate problems here - 1) getting the input from the pedal and 2) controlling the Udemy video.

 

Does the foot pedal send keystrokes?  If so, you should be able to capture them in a workflow with a Hotkey trigger.

 

That would then need to call a script to switch to chrome and dispatch the keystroke.  Or maybe an open URL with browser set to Chrome depending on how Udemy does it. 

 

Link to comment

Hi Chris, welcome to the forum.

 

Your question doesn't really have anything to do with Alfred. Alfred is a launcher, not an automation application. It runs things, and you're wanting to use a foot pedal to perform the role that Alfred would normally perform.

 

It may well be possible to do what you want, but I can't say for sure.

 

Firstly, you'd need to know whether it's at all possible to control a Udemy video from outside your browser. It sounds like you'd need to inject some JavaScript into the Udemy page that tells the video to skip. You can also simulate keypresses via AppleScript if the video player supports any keyboard shortcuts, but that's probably not suitable for your case because it means bringing the browser to the front, which will interfere with the other window you're working in.

 

Secondly, once you've figured out the scripts you need, you need to know how to run them from your foot pedal. But you haven't explained at all how that works. Does it have its own software? Does it just simulate keypresses (in which case Alfred could help to connect the pedal to the scripts)?

 

It's possible that some forum member is also a Udemy and/or pedal user and can help you. But I think you would have a better chance of success asking on a more relevant forum, such as one related to Udemy, your pedal, or a general Apple scripting/automation forum like [Ask Different](https://apple.stackexchange.com).

Link to comment

Hi,

 

Yep, the pedal can be set up to send keystrokes (I'm looking for the right mac software for this).  I was thinking that to do what I want it would be necessary to note which window is in focus, switch to chrome, execute the action (say rewind 10 seconds), switch focus back to the window that was originally in focus and end (panting) ready to carry on as if nothing had happened.

 

It would be so cool if Alfred just knew about foot pedals and was therefore could generate the necessary keystrokes.

 

I'm really unsure if this is the right track.  It just seems that this type of functionality would be really helpful.  Soooo many people are turning to on-line video based education that need something like this.  It is just tiresome to flip back and forth between windows that are often very similar looking but one is a video and the other is your stop-start-hesitate effort to follow along in parallel.

 

Cheers,

 

Chris

Link to comment

Thanks,

 

I understand but I was (and remain ) hopeful.  Being able to use a foot pedal to add a foot driven dimension to the (admitedly sophisticated) single dimension of keyboard entry is appealing.  I thought it worthwhile asking here because Alfred does exactly that in some sense -it makes the keyboard better, able to reach further, and be faster.  My experience to date with the foot pedals for transcription suggests to me that an Alfred that knows about foot pedals could be a very interesting beast indeed!

 

 

Link to comment
35 minutes ago, Chris62 said:

I'm really unsure if this is the right track.

 

I'm using Udemy (and other video-player application) with "Alfred remote" and with any the tactile interaction should be much handier, I think. Good idea.

Edited by bikeNik
Link to comment
24 minutes ago, bikeNik said:

 

I'm using Udemy (and other video-player application) with "Alfred remote" and with any the tactile interaction should be much handier, I think. Good idea.

 

Thanks, that's what I'm trying to get to. 🙂  I'm convinced that the 'muscle memory' of pausing, rewinding etc. using a foot pedal (as you do with transcription) whilst pouring mental energy into the doing side of on-line learning keeps the two activities separate in a useful way.  Imagine that you could stand on the brakes and rewind in class when the teacher says something that you just need to have repeated without taking your hands off the controls.

Link to comment

@Chris62

1 hour ago, Chris62 said:

I'm looking for the right mac software for this

 

If you have Apple TV you can use SiriMote .  This App with the remote controller from Apple Tv realizes these three (and not only) commands not bad. But it's hand controls.

Also, you could consider the Karabiner.app .  Some search for example - Simple foot pedal modifier key question #703

Edited by bikeNik
Link to comment
2 hours ago, Chris62 said:

It would be so cool if Alfred just knew about foot pedals and was therefore could generate the necessary keystrokes.

 

I don't follow you. How would Alfred generating keystrokes help with the pedal? It seems to me, you want to use the pedal to generate keystrokes and then create a corresponding Hotkey in Alfred that is activated when you hit the pedal. Connect that Hotkey to the script you want to run and you're there.

 

2 hours ago, Chris62 said:

I was thinking that to do what I want it would be necessary to note which window is in focus, switch to chrome, execute the action (say rewind 10 seconds), switch focus back to the window that was originally in focus and end (panting) ready to carry on as if nothing had happened.

 

One potential problem with this is that when you activate an app via AppleScript, it works like command-tabbing to the app, i.e. all its windows are brought to the front. So you'll have to be careful that none of the browser/editor (or whatever app you're working with) windows overlap.


You might want to consider using something like Epichrome to create a site-specific browser for Udemy. That way you won't have to close or re-arrange all your regular browser windows so they don't cover anything important when you switch focus to the Udemy window.

 

Is it not possible to watch Udemy videos in a regular video player like VLC or mpv? youtube-dl apparently supports it, which means mpv does, too.

 

2 hours ago, Chris62 said:

It is just tiresome to flip back and forth between windows that are often very similar looking but one is a video and the other is your stop-start-hesitate effort to follow along in parallel.

 

That's why videos suck for a lot of kinds of tutorials: they're basically impossible to follow in real time. Text (with images and short videos/animations as necessary) is waaay better. There's no stop-rewind-repeat. You just read along at your own speed.

 

1 hour ago, Chris62 said:

Imagine that you could stand on the brakes and rewind in class when the teacher says something that you just need to have repeated without taking your hands off the controls.

 

Or just re-read the previous paragraph in the text(book)… ¯\_(ツ)_/¯

Edited by deanishe
Link to comment
6 hours ago, deanishe said:

This pedal sounds right up his street.

 

Pedals are useless in that first they are not portable. But more importantly they provide nothing in terms of utility. 3 programmable pedals can yield max 9 actions you can run. 

With your keyboard and something to program it like Karabiner or QMK you can map 1,000s or actions and put them right at your finger tips. Pressing two keys is faster and far more natural then remembering to press on a pedal. 

 

@Chris62 I recently wrote an introductory article to the power of Karabiner. It solved this and many other problems for me wonderfully. I would check it out.

 

Also for your case of controlling Udemy playback, Keyboard Maestro app is much more suitable to make these kinds of things. Alfred to me is just a way to filter and search through different kinds of data. KM makes making these small actions like controlling playback in a window and other things far easier. 

 

Here is a macro I use any time I watch a video (which usually happens on YouTube). It instantly increases playback to 1.5x speed. Can press it again for 2x. Mine has extra keystrokes sent because I am using VIM mode inside my browser with sVim on Safari.

 

376486078_2019-01-10at07_02.png.9471545c8303b825291591bc216dc7f2.png

 

 

For your case I would use something like this:

 

1098323665_2019-01-10at07_06.png.c921ce65aef0e906e1183c54decb5121.png

 

Or even better this:

 

1335163909_2019-01-10at07_11.thumb.png.0b9894001fc4148865cc00691383e028.png

 

KM is also amazing because to my mind, the way you construct these macros out of actions just makes sense. I share all KM macros I use too for anyone interested. 

 

 

 

Edited by nikivi
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...