Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a button for a copy of the current page. #1181

Open
bruening-bw opened this issue Dec 8, 2024 · 7 comments
Open

Add a button for a copy of the current page. #1181

bruening-bw opened this issue Dec 8, 2024 · 7 comments

Comments

@bruening-bw
Copy link

feature request

Instead of adding a new page I always make a copy of the current page. Then, instead of clearing the whole page, i clear only parts of it and leave the elements last drawn on the board for those students who are still busy copying. This is helpful for students and I don't have to wait for everybody to finish copying. And, by the way, it is closer to the use of a chalkboard.

The button would speed up my workflow a little bit. Would creating the button a big issue?

@letsfindaway
Copy link
Collaborator

There already is this possibility!

Just make a long press on the "Add Page" button and you get a popup menu. The middle option duplicates the current page and makes the duplicate the current page.
image

@bruening-bw
Copy link
Author

Ah, I didn't know that. But still it would be cool to have the button in the taskbar to make it faster. There would be enough space in the bar for users with FullHD devices. But I understand that it is not cool for lower resolutions. Thanks anyway.

@letsfindaway
Copy link
Collaborator

Yes, there are already low-res users complaining about too many buttons. But I have another idea.

You can also assign a keyboard shortcut to that action:

  • Locate your OpenBoardUser.config and add the following entry:
[Shortcut]
actionDuplicatePage=Alt+D, 0, 0
  • Then pressing Alt+D will duplicate the current page

This works starting with OpenBoard 1.7.2.

@bruening-bw
Copy link
Author

Cool! A shortcut is even better. I did a few minutes of research, and cool again! I didn't know about the many undocumented actions shortcuts can be attached to.

I am thinking about helping with the documentation. The Tutorial is not quite up to date. And since I have no coding skills it is the only thing I could contribute.

@bruening-bw
Copy link
Author

bruening-bw commented Dec 10, 2024

I added the shortcut. But it is not working properly. It does the job when the left panel is open. Otherwise I have to press the shortcut twice to be effective.

What does ", 0, 0" do?

EDIT: I tried again after restarting OpenBoard. Now it seems to work fine.

Thank you!!!

@letsfindaway
Copy link
Collaborator

letsfindaway commented Dec 10, 2024

I added the shortcut. But it is not working properly. It does the job when the left panel is open. Otherwise I have to press the shortcut twice to be effective.

Hmm, for me it works at the first press of the shortcut. I don't know what I'm doing different.

What does ", 0, 0" do?

There are plans to add a User Interface to the shortcut configuration, but this needs more discussions how this should look like. Then it would not be necessary to edit the settings file.

The , 0, 0 are meant to assign Mouse or Stylus pen buttons to an action. But -- despite the zero -- it is not easy to describe what number you have to put there to assign one of the special keys of a mouse. So I cannot give a good description for that. In the end in the GUI, you probably just press that button and OpenBoard inserts the proper number for you. In the meantime, just add , 0, 0. It is necessary to create the proper syntax.

@letsfindaway
Copy link
Collaborator

Cool! A shortcut is even better. I did a few minutes of research, and cool again! I didn't know about the many undocumented actions shortcuts can be attached to.

The current list of supported actions can be seen here in the code:

void UBShortcutManager::addMainActions(UBMainWindow *mainWindow)
{
addActions(tr("Common"), {
mainWindow->actionStylus,
mainWindow->actionBoard,
mainWindow->actionWeb,
mainWindow->actionDocument,
mainWindow->actionDesktop,
mainWindow->actionLibrary,
mainWindow->actionVirtualKeyboard,
mainWindow->actionOpenTutorial,
mainWindow->actionHideApplication,
mainWindow->actionCut,
mainWindow->actionCopy,
mainWindow->actionPaste,
mainWindow->actionQuit
}, mainWindow);
addActions(tr("Board"), {
mainWindow->actionUndo,
mainWindow->actionRedo,
mainWindow->actionNewPage,
mainWindow->actionDuplicatePage,
mainWindow->actionImportPage,
mainWindow->actionBack,
mainWindow->actionForward,
mainWindow->actionAdd,
mainWindow->actionClearPage,
mainWindow->actionEraseItems,
mainWindow->actionEraseAnnotations,
mainWindow->actionEraseBackground
}, mainWindow);
addActions(tr("Stylus Palette"),{
mainWindow->actionPen,
mainWindow->actionEraser,
mainWindow->actionMarker,
mainWindow->actionSelector,
mainWindow->actionPlay,
mainWindow->actionHand,
mainWindow->actionZoomIn,
mainWindow->actionZoomOut,
mainWindow->actionPointer,
mainWindow->actionLine,
mainWindow->actionText,
mainWindow->actionCapture
}, mainWindow);
if(UBPlatformUtils::hasVirtualKeyboard())
{
addActions(tr("Stylus Palette"),{ mainWindow->actionVirtualKeyboard }, mainWindow);
}
addActions(tr("Stylus Palette"),{ mainWindow->actionSnap }, mainWindow);
addActions(tr("Lines and colours"), {
mainWindow->actionLineSmall,
mainWindow->actionLineMedium,
mainWindow->actionLineLarge,
mainWindow->actionEraserSmall,
mainWindow->actionEraserMedium,
mainWindow->actionEraserLarge,
mainWindow->actionColor0,
mainWindow->actionColor1,
mainWindow->actionColor2,
mainWindow->actionColor3,
mainWindow->actionColor4
}, mainWindow);
addActions(tr("Background"), {
mainWindow->actionBackgrounds,
mainWindow->actionPlainLightBackground,
mainWindow->actionCrossedLightBackground,
mainWindow->actionRuledLightBackground,
mainWindow->actionPlainDarkBackground,
mainWindow->actionCrossedDarkBackground,
mainWindow->actionRuledDarkBackground,
mainWindow->actionDefaultGridSize,
mainWindow->actionDrawIntermediateGridLines
}, mainWindow);
addActions(tr("Podcast"), {
mainWindow->actionPodcastRecord //,
// mainWindow->actionPodcastPause currently not activated in UBPodcastRecordingPalette
}, mainWindow);

I think for most of them you can at least imagine what they do. There are some hardcoded shortcuts too, which are mentioned in the code after that. Those shortcuts cannot be changed.

I am thinking about helping with the documentation. The Tutorial is not quite up to date. And since I have no coding skills it is the only thing I could contribute.

Documentation would always help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants