You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Cupertino Panel layout, the OSX key binding for file renaming can be matched to resemble that of OSX, which is the Enter key instead of F2. After changing the concerning line in the accels file and restarting caja, it is possible to press the Enter key in order to rename. One would expect that pressing the Enter key once more, would apply the text and exit the renaming mode.
In the function libcaja-private/caja-icon-container.c
key_press_event (GtkWidget *widget,
GdkEventKey *event)
...
if (is_renaming (container) || is_renaming_pending (container))
{
switch (event->keyval)
{
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
end_renaming_mode (container, TRUE);
...
I would expect that the function end_renaming_mode(container, TRUE) would be triggered here and rename the file accordingly and end the renaming mode.
Actual behaviour
When pressing the Enter key a second time, caja stays in the renaming mode and selects the whole filename including the extension if applicable. Applying the change is possible when pressing Shift Enter.
Steps to reproduce the behaviour
Change F2 to Return in the accels file with:
caja -q; sed -i 's/.*DirViewActions\/Rename\".*/\(gtk_accel_path \"<Actions>\/DirViewActions\/Rename\" \"Return\"\)/g' ~/.config/caja/accels
Open caja and select a file. Press the Enter key and observe that it enters in rename mode.
Change the filename and press the Enter key once more.
Observe that caja stays in rename mode.
Pressing escape will revert the change. Pressing shift Enter or clicking somewhere with the mouse will effectuate the change.
To revert the F2 to Return change, use following command:
caja -q; sed -i 's/.*DirViewActions\/Rename\".*/; \(gtk_accel_path \"<Actions>\/DirViewActions\/Rename\" \"F2\"\)/g' ~/.config/caja/accels
MATE general version
Mate 1.26.2
Package version
Caja version 1.26.3
Linux Distribution
Ubuntu-Mate 24.04.1 LTS (Noble Numbat) 64-bit
Link to bugreport of your Distribution (requirement)
The text was updated successfully, but these errors were encountered:
As an unwanted side-effect, when creating a new directory with keyboard shortcut Shift Control N followed by typing a name, it does not exit from the input field after pressing enter. Again, a workaround is to press Shift Enter
Also, the feature to press twice on the rename key (F2) in order to select the whole filename including the extension is not compatible with the OSX enter-key keybinding. Maybe with the enter key for renaming it should be made configurable: OSX style or press twice to select the whole filename including the extension.
I think nemo solved this with following addition in src/nemo-window.c:
staticgbooleannemo_window_key_press_event (GtkWidget*widget,
GdkEventKey*event)
{
NemoWindow*window;
NemoWindowSlot*active_slot;
NemoView*view;
GtkWidget*focus_widget;
size_ti;
window=NEMO_WINDOW (widget);
active_slot=nemo_window_get_active_slot (window);
view=active_slot->content_view;
...
if (view!=NULL&&nemo_view_get_is_renaming (view)) {
/* if we're renaming, just forward the event to the * focused widget and return. We don't want to process the window * accelerator bindings, as they might conflict with the * editable widget bindings. */if (gtk_window_propagate_key_event (GTK_WINDOW (window), event)) {
return TRUE;
}
/* Do not allow for other accelerator bindings to fire off while * renaming is in progress */return FALSE;
}
...
}
In caja there is no similar function like nemo_view_get_is_renaming (view). The member is_renaming of the struct NemoView is in caja not implemented in the function in src/nemo-view.c
Expected behaviour
With Cupertino Panel layout, the OSX key binding for file renaming can be matched to resemble that of OSX, which is the Enter key instead of F2. After changing the concerning line in the accels file and restarting caja, it is possible to press the Enter key in order to rename. One would expect that pressing the Enter key once more, would apply the text and exit the renaming mode.
In the function libcaja-private/caja-icon-container.c
I would expect that the function
end_renaming_mode(container, TRUE)
would be triggered here and rename the file accordingly and end the renaming mode.Actual behaviour
When pressing the Enter key a second time, caja stays in the renaming mode and selects the whole filename including the extension if applicable. Applying the change is possible when pressing Shift Enter.
Steps to reproduce the behaviour
caja -q; sed -i 's/.*DirViewActions\/Rename\".*/\(gtk_accel_path \"<Actions>\/DirViewActions\/Rename\" \"Return\"\)/g' ~/.config/caja/accels
To revert the F2 to Return change, use following command:
caja -q; sed -i 's/.*DirViewActions\/Rename\".*/; \(gtk_accel_path \"<Actions>\/DirViewActions\/Rename\" \"F2\"\)/g' ~/.config/caja/accels
MATE general version
Mate 1.26.2
Package version
Caja version 1.26.3
Linux Distribution
Ubuntu-Mate 24.04.1 LTS (Noble Numbat) 64-bit
Link to bugreport of your Distribution (requirement)
The text was updated successfully, but these errors were encountered: